mirror of https://github.com/knative/pkg.git
Spelling (#1797)
* spelling: adopted Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: aliased Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: apierrs Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: assignment Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: coexistence Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: commit Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: conversions Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: creates Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: custom Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: determine Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: different Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: distribution Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: duplicate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: editing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: endpoint Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: environment Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: generate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: implementation Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: identified Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: ignore Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: indicates Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: interface Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: interleaved Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: labels Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: label Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: mimic Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: namespaced Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: necessary Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: organization Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: populatable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: prometheus Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: refer Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: reference Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: repetitive Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: response Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: something Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: specable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: spoofing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: synchronized Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: this Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: trailing Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unsupported Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: validation Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * chore: reviewdog go header boilerplate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
parent
c1a8664276
commit
b39d5da935
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, "/")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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=<app>
|
||||
Gets the list of pods that satisfy the label selector app=<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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
}},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue