diff --git a/go.mod b/go.mod index c4e0e01e..94e58ad7 100644 --- a/go.mod +++ b/go.mod @@ -20,5 +20,5 @@ require ( k8s.io/code-generator v0.19.7 k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 knative.dev/hack v0.0.0-20210428122153-93ad9129c268 - knative.dev/pkg v0.0.0-20210525142738-ea766de6bdd1 + knative.dev/pkg v0.0.0-20210526081028-980a33719a10 ) diff --git a/go.sum b/go.sum index 7923ea19..86223b14 100644 --- a/go.sum +++ b/go.sum @@ -1116,8 +1116,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= knative.dev/hack v0.0.0-20210428122153-93ad9129c268 h1:lBIj9Epd9UQ55NEaHzAdY/UZbuaegCdGPKVC2+Z68Q0= knative.dev/hack v0.0.0-20210428122153-93ad9129c268/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/pkg v0.0.0-20210525142738-ea766de6bdd1 h1:i+oPTPkGg32aZgrbfMzVC+kejeYAxd5Bgz1iIBe4Z6U= -knative.dev/pkg v0.0.0-20210525142738-ea766de6bdd1/go.mod h1:nOD9XjvR+UuO1fHZSaOhfTWDCIz06crh1qQppgZDzR0= +knative.dev/pkg v0.0.0-20210526081028-980a33719a10 h1:4tC0TcIx4EU6PCcRwdIiCWuKI3vpOgpQUrF1nUeF1t8= +knative.dev/pkg v0.0.0-20210526081028-980a33719a10/go.mod h1:nOD9XjvR+UuO1fHZSaOhfTWDCIz06crh1qQppgZDzR0= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/vendor/knative.dev/pkg/apis/condition_set.go b/vendor/knative.dev/pkg/apis/condition_set.go index 1d81355b..1b110475 100644 --- a/vendor/knative.dev/pkg/apis/condition_set.go +++ b/vendor/knative.dev/pkg/apis/condition_set.go @@ -27,7 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// Conditions is the interface for a Resource that implements the getter and +// ConditionsAccessor is the interface for a Resource that implements the getter and // setter for accessing a Condition collection. // +k8s:deepcopy-gen=true type ConditionsAccessor interface { diff --git a/vendor/knative.dev/pkg/apis/condition_types.go b/vendor/knative.dev/pkg/apis/condition_types.go index 5b428868..f0517527 100644 --- a/vendor/knative.dev/pkg/apis/condition_types.go +++ b/vendor/knative.dev/pkg/apis/condition_types.go @@ -52,7 +52,7 @@ const ( ConditionSeverityInfo ConditionSeverity = "Info" ) -// Conditions defines a readiness condition for a Knative resource. +// Condition defines a readiness condition for a Knative resource. // See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties // +k8s:deepcopy-gen=true type Condition struct { diff --git a/vendor/knative.dev/pkg/apis/deprecated.go b/vendor/knative.dev/pkg/apis/deprecated.go index fc9bca5f..fb73306f 100644 --- a/vendor/knative.dev/pkg/apis/deprecated.go +++ b/vendor/knative.dev/pkg/apis/deprecated.go @@ -33,7 +33,7 @@ func CheckDeprecated(ctx context.Context, obj interface{}) *FieldError { return CheckDeprecatedUpdate(ctx, obj, nil) } -// CheckDeprecated checks whether the provided named deprecated fields +// CheckDeprecatedUpdate checks whether the provided named deprecated fields // are set in a context where deprecation is disallowed. // This is a json shallow check. We will recursively check inlined structs. func CheckDeprecatedUpdate(ctx context.Context, obj, original interface{}) *FieldError { diff --git a/vendor/knative.dev/pkg/apis/duck/register.go b/vendor/knative.dev/pkg/apis/duck/register.go index 93cf55d7..34f13d6a 100644 --- a/vendor/knative.dev/pkg/apis/duck/register.go +++ b/vendor/knative.dev/pkg/apis/duck/register.go @@ -21,6 +21,7 @@ import ( ) const ( + // GroupName is the name of the API group. GroupName = ducktypes.GroupName // AddressableDuckVersionLabel is the label we use to declare diff --git a/vendor/knative.dev/pkg/apis/duck/v1/register.go b/vendor/knative.dev/pkg/apis/duck/v1/register.go index 67418b3e..fb4348a0 100644 --- a/vendor/knative.dev/pkg/apis/duck/v1/register.go +++ b/vendor/knative.dev/pkg/apis/duck/v1/register.go @@ -38,8 +38,10 @@ func Resource(resource string) schema.GroupResource { } var ( + // SchemeBuilder builds a scheme with the types known to the package. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme + // AddToScheme adds the types known to this package to an existing schema. + AddToScheme = SchemeBuilder.AddToScheme ) // Adds the list of known types to Scheme. diff --git a/vendor/knative.dev/pkg/configmap/manual_watcher.go b/vendor/knative.dev/pkg/configmap/manual_watcher.go index bd28e7c2..a2760b44 100644 --- a/vendor/knative.dev/pkg/configmap/manual_watcher.go +++ b/vendor/knative.dev/pkg/configmap/manual_watcher.go @@ -44,7 +44,7 @@ func (w *ManualWatcher) Watch(name string, o ...Observer) { w.observers[name] = append(w.observers[name], o...) } -// Watch implements Watcher +// ForEach implements Watcher func (w *ManualWatcher) ForEach(f func(string, []Observer) error) error { for k, v := range w.observers { if err := f(k, v); err != nil { diff --git a/vendor/knative.dev/pkg/controller/controller.go b/vendor/knative.dev/pkg/controller/controller.go index 747cf58e..9593eef2 100644 --- a/vendor/knative.dev/pkg/controller/controller.go +++ b/vendor/knative.dev/pkg/controller/controller.go @@ -477,7 +477,8 @@ func (c *Impl) RunContext(ctx context.Context, threadiness int) error { return nil } -// DEPRECATED use RunContext instead. +// Run runs the controller. +// DEPRECATED: Use RunContext instead. func (c *Impl) Run(threadiness int, stopCh <-chan struct{}) error { // Create a context that is cancelled when the stopCh is called. ctx, cancel := context.WithCancel(context.Background()) diff --git a/vendor/knative.dev/pkg/controller/stats_reporter.go b/vendor/knative.dev/pkg/controller/stats_reporter.go index 474bab3f..6735285d 100644 --- a/vendor/knative.dev/pkg/controller/stats_reporter.go +++ b/vendor/knative.dev/pkg/controller/stats_reporter.go @@ -48,7 +48,9 @@ var ( // - characters are printable US-ASCII reconcilerTagKey = tag.MustNewKey("reconciler") successTagKey = tag.MustNewKey("success") - NamespaceTagKey = tag.MustNewKey(metricskey.LabelNamespaceName) + + // NamespaceTagKey marks metrics with a namespace. + NamespaceTagKey = tag.MustNewKey(metricskey.LabelNamespaceName) ) func init() { diff --git a/vendor/knative.dev/pkg/reconciler/events.go b/vendor/knative.dev/pkg/reconciler/events.go index 4c85c884..df4c366c 100644 --- a/vendor/knative.dev/pkg/reconciler/events.go +++ b/vendor/knative.dev/pkg/reconciler/events.go @@ -62,7 +62,7 @@ func NewEvent(eventtype, reason, messageFmt string, args ...interface{}) Event { // ReconcilerEvent wraps the fields required for recorders to create a // kubernetes recorder Event. -type ReconcilerEvent struct { //nolint:golint // for backcompat. +type ReconcilerEvent struct { //nolint:revive // for backcompat. EventType string Reason string Format string diff --git a/vendor/knative.dev/pkg/reconciler/reconcile_common.go b/vendor/knative.dev/pkg/reconciler/reconcile_common.go index f7408fb4..114d53b0 100644 --- a/vendor/knative.dev/pkg/reconciler/reconcile_common.go +++ b/vendor/knative.dev/pkg/reconciler/reconcile_common.go @@ -31,9 +31,13 @@ import ( const failedGenerationBump = "NewObservedGenFailure" const ( - DoReconcileKind = "ReconcileKind" - DoFinalizeKind = "FinalizeKind" - DoObserveKind = "ObserveKind" + // DoReconcileKind is the function name for reconciling the resource (as a leader). + DoReconcileKind = "ReconcileKind" + // DoFinalizeKind is the function name for finalizing the resource (as a leader). + DoFinalizeKind = "FinalizeKind" + // DoObserveKind is the function name for observing the resource (as a non leader). + DoObserveKind = "ObserveKind" + // DoObserveFinalizeKind is the function name for observing finalization of the resource (as a non leader). DoObserveFinalizeKind = "ObserveFinalizeKind" ) diff --git a/vendor/knative.dev/pkg/system/env.go b/vendor/knative.dev/pkg/system/env.go index d9ec3dda..ea1db0f0 100644 --- a/vendor/knative.dev/pkg/system/env.go +++ b/vendor/knative.dev/pkg/system/env.go @@ -22,7 +22,10 @@ import ( ) const ( - NamespaceEnvKey = "SYSTEM_NAMESPACE" + // NamespaceEnvKey is the environment variable that specifies the system namespace. + NamespaceEnvKey = "SYSTEM_NAMESPACE" + // ResourceLabelEnvKey is the environment variable that specifies the system resource + // label. ResourceLabelEnvKey = "SYSTEM_RESOURCE_LABEL" ) diff --git a/vendor/modules.txt b/vendor/modules.txt index 35c2c70b..2a56e923 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -667,7 +667,7 @@ k8s.io/utils/trace # knative.dev/hack v0.0.0-20210428122153-93ad9129c268 ## explicit knative.dev/hack -# knative.dev/pkg v0.0.0-20210525142738-ea766de6bdd1 +# knative.dev/pkg v0.0.0-20210526081028-980a33719a10 ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck