Repository: knative/pkg
Pull request #1783 (2020-10-07 06:14:38)

Enable golint and exclude some other generated or additional dirs
Also remove `test` ignore, since it's covered by path ignore rule.

/assign @markusthoemmes 

knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/pkg/pull/1783#" title="Author self-approved">vagababov</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fpkg).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative/pkg/blob/master/OWNERS)~~ [vagababov]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/.codecov.yaml b/.codecov.yaml
index 293b2a951..da447d16a 100644
--- a/.codecov.yaml
+++ b/.codecov.yaml
@@ -4,7 +4,9 @@ coverage:
   status:
     project:
       default:
-        target: 80
+        # https://github.com/knative/pkg/issues/1785
+        # Real goal is 80, but prow sees this as a blocker if not met for merging.
+        target: 68
         threshold: 1%
     patch:
       # Disable the coverage threshold of the patch, so that PRs are
diff --git a/.golangci.yaml b/.golangci.yaml
index 93c24b0f4..5f4977dd2 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -2,12 +2,14 @@ run:
   timeout: 5m
 
   skip-dirs:
+    - client
     - injection/client
-    - test/mako
+    - third_party
 
 linters:
   enable:
     - asciicheck
+    - golint
     - gosec
     - prealloc
     - stylecheck
diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES
index 08d75e775..5eed75f37 100644
--- a/OWNERS_ALIASES
+++ b/OWNERS_ALIASES
@@ -8,6 +8,7 @@ aliases:
   - tcnghia
   - vagababov
   - vaikas
+  - n3wscott
 
   apis-approvers:
   - mattmoor
diff --git a/README.md b/README.md
index b0098ca9c..7304a49c8 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
 
 [![GoDoc](https://godoc.org/github.com/knative/pkg?status.svg)](https://godoc.org/github.com/knative/pkg)
 [![Go Report Card](https://goreportcard.com/badge/knative/pkg)](https://goreportcard.com/report/knative/pkg)
+[![codecov](https://codecov.io/gh/knative/pkg/branch/master/graph/badge.svg)](https://codecov.io/gh/knative/pkg)
 
 Knative `pkg` provides a place for sharing common Knative packages across the
 Knative repos.
diff --git a/apis/duck/v1/fuzzer.go b/apis/duck/v1/fuzzer.go
new file mode 100644
index 000000000..4ef66e589
--- /dev/null
+++ b/apis/duck/v1/fuzzer.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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 v1
+
+import (
+	fuzz "github.com/google/gofuzz"
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime/serializer"
+	"knative.dev/pkg/apis"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+)
+
+var testConditions = apis.Conditions{{Type: apis.ConditionReady}, {Type: apis.ConditionSucceeded}}
+
+// FuzzerFuncs includes fuzzing funcs for knative.dev/duck v1 types
+// In particular it makes sure that Delivery has only valid BackoffPolicyType in it.
+//
+// For other examples see
+// https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/fuzzer/fuzzer.go
+var FuzzerFuncs = fuzzer.MergeFuzzerFuncs(
+	func(codecs serializer.CodecFactory) []interface{} {
+		return []interface{}{
+			func(status *Status, c fuzz.Continue) {
+				c.FuzzNoCustom(status) // fuzz the Status
+				status.SetConditions(testConditions)
+				pkgfuzzer.FuzzConditions(status, c)
+			},
+		}
+	},
+)
diff --git a/apis/duck/v1beta1/fuzzer.go b/apis/duck/v1beta1/fuzzer.go
new file mode 100644
index 000000000..efc8be973
--- /dev/null
+++ b/apis/duck/v1beta1/fuzzer.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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 v1beta1
+
+import (
+	fuzz "github.com/google/gofuzz"
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime/serializer"
+	"knative.dev/pkg/apis"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+)
+
+var testConditions = apis.Conditions{{Type: apis.ConditionReady}, {Type: apis.ConditionSucceeded}}
+
+// FuzzerFuncs includes fuzzing funcs for knative.dev/duck v1beta1 Status types
+//
+// For other examples see
+// https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/fuzzer/fuzzer.go
+var FuzzerFuncs = fuzzer.MergeFuzzerFuncs(
+	func(codecs serializer.CodecFactory) []interface{} {
+		return []interface{}{
+			func(status *Status, c fuzz.Continue) {
+				c.FuzzNoCustom(status) // fuzz the Status
+				status.SetConditions(testConditions)
+				pkgfuzzer.FuzzConditions(status, c)
+			},
+		}
+	},
+)
diff --git a/controller/controller.go b/controller/controller.go
index ee35f37bf..cee68931d 100644
--- a/controller/controller.go
+++ b/controller/controller.go
@@ -207,7 +207,7 @@ type Impl struct {
 
 // ControllerOptions encapsulates options for creating a new controller,
 // including throttling and stats behavior.
-type ControllerOptions struct {
+type ControllerOptions struct { //nolint for backcompat.
 	WorkQueueName string
 	Logger        *zap.SugaredLogger
 	Reporter      StatsReporter
diff --git a/hash/hash.go b/hash/hash.go
index b6b642122..1c4c5352f 100644
--- a/hash/hash.go
+++ b/hash/hash.go
@@ -153,7 +153,7 @@ func ChooseSubset(from sets.String, n int, target string) sets.String {
 		}
 		// Already matched this one. Continue to the next index.
 		for selection.Has(root) {
-			root += 1
+			root++
 			if root == hpl {
 				root = 0
 			}
diff --git a/injection/config.go b/injection/config.go
index 01a5962b7..bae2b2e25 100644
--- a/injection/config.go
+++ b/injection/config.go
@@ -20,6 +20,7 @@ import (
 	"errors"
 	"flag"
 	"log"
+	"math"
 	"os"
 	"os/user"
 	"path/filepath"
@@ -37,6 +38,9 @@ func ParseAndGetRESTConfigOrDie() *rest.Config {
 			"The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
 		kubeconfig = flag.String("kubeconfig", "",
 			"Path to a kubeconfig. Only required if out-of-cluster.")
+
+		burst = flag.Int("kube-api-burst", 0, "Maximum burst for throttle.")
+		qps   = flag.Float64("kube-api-qps", 0, "Maximum QPS to the server from the client.")
 	)
 	klog.InitFlags(flag.CommandLine)
 	flag.Parse()
@@ -46,6 +50,16 @@ func ParseAndGetRESTConfigOrDie() *rest.Config {
 		log.Fatal("Error building kubeconfig: ", err)
 	}
 
+	if *burst < 0 {
+		log.Fatal("Invalid burst value", *burst)
+	}
+	if *qps < 0 || *qps > math.MaxFloat32 {
+		log.Fatal("Invalid QPS value", *qps)
+	}
+
+	cfg.Burst = *burst
+	cfg.QPS = float32(*qps)
+
 	return cfg
 }
 
diff --git a/logging/config.go b/logging/config.go
index 65409032a..d8c4b609b 100644
--- a/logging/config.go
+++ b/logging/config.go
@@ -240,8 +240,7 @@ func ConfigMapName() string {
 
 // JsonToLoggingConfig converts a json string of a Config.
 // Returns a non-nil Config always.
-// nolint:stylecheck // No rename due to backwards incompatibility.
-func JsonToLoggingConfig(jsonCfg string) (*Config, error) {
+func JsonToLoggingConfig(jsonCfg string) (*Config, error) { //nolint No rename due to backwards incompatibility.
 	if jsonCfg == "" {
 		return nil, errEmptyJSONLogginString
 	}
@@ -260,8 +259,7 @@ func JsonToLoggingConfig(jsonCfg string) (*Config, error) {
 }
 
 // LoggingConfigToJson converts a Config to a json string.
-// nolint:stylecheck // No rename due to backwards incompatibility.
-func LoggingConfigToJson(cfg *Config) (string, error) {
+func LoggingConfigToJson(cfg *Config) (string, error) { //nolint No rename due to backwards incompatibility.
 	if cfg == nil || cfg.LoggingConfig == "" {
 		return "", nil
 	}
diff --git a/metrics/config.go b/metrics/config.go
index bb55d410b..8eb829775 100644
--- a/metrics/config.go
+++ b/metrics/config.go
@@ -346,8 +346,7 @@ func prometheusPort() (int, error) {
 
 // JsonToMetricsOptions converts a json string of a
 // ExporterOptions. Returns a non-nil ExporterOptions always.
-// nolint:stylecheck // No rename due to backwards incompatibility.
-func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) {
+func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { // nolint No rename due to backwards incompatibility.
 	var opts ExporterOptions
 	if jsonOpts == "" {
 		return nil, errors.New("json options string is empty")
@@ -361,8 +360,7 @@ func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) {
 }
 
 // MetricsOptionsToJson converts a ExporterOptions to a json string.
-// nolint:stylecheck // No rename due to backwards incompatibility.
-func MetricsOptionsToJson(opts *ExporterOptions) (string, error) {
+func MetricsOptionsToJson(opts *ExporterOptions) (string, error) { // nolint No rename due to backwards incompatibility.
 	if opts == nil {
 		return "", nil
 	}
diff --git a/metrics/stackdriver_exporter.go b/metrics/stackdriver_exporter.go
index ec9dba8c2..e3bebe187 100644
--- a/metrics/stackdriver_exporter.go
+++ b/metrics/stackdriver_exporter.go
@@ -89,7 +89,7 @@ var (
 	// which should be promoted to Stackdriver Resource labels via opencensus resources.
 	metricToResourceLabels = map[string]*resourceTemplate{}
 
-	// A variable for testing to reduce the size (number of metrics) buffered before
+	// TestOverrideBundleCount is a variable for testing to reduce the size (number of metrics) buffered before
 	// Stackdriver will send a bundled metric report. Only applies if non-zero.
 	TestOverrideBundleCount = 0
 )
diff --git a/reconciler/events.go b/reconciler/events.go
index 6c635643b..262b26222 100644
--- a/reconciler/events.go
+++ b/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 {
+type ReconcilerEvent struct { //nolint for backcompat.
 	EventType string
 	Reason    string
 	Format    string
diff --git a/tracing/config/tracing.go b/tracing/config/tracing.go
index baa3377d1..84128b440 100644
--- a/tracing/config/tracing.go
+++ b/tracing/config/tracing.go
@@ -132,8 +132,8 @@ func NewTracingConfigFromConfigMap(config *corev1.ConfigMap) (*Config, error) {
 
 // JsonToTracingConfig converts a json string of a Config.
 // Returns a non-nil Config always and an eventual error.
-// nolint:stylecheck // No rename due to backwards incompatibility.
-func JsonToTracingConfig(jsonCfg string) (*Config, error) {
+func JsonToTracingConfig(jsonCfg string) (*Config, error) { //nolint:stylecheck for backcompat.
+
 	if jsonCfg == "" {
 		return defaultConfig(), errors.New("empty json tracing config")
 	}
@@ -151,8 +151,7 @@ func JsonToTracingConfig(jsonCfg string) (*Config, error) {
 }
 
 // TracingConfigToJson converts a Config to a json string.
-// nolint:stylecheck // No rename due to backwards incompatibility.
-func TracingConfigToJson(cfg *Config) (string, error) {
+func TracingConfigToJson(cfg *Config) (string, error) { //nolint:stylecheck for backcompat.
 	if cfg == nil {
 		return "", nil
 	}


Test patch:
diff --git a/apis/duck/v1/roundtrip_test.go b/apis/duck/v1/roundtrip_test.go
new file mode 100644
index 000000000..25bca151b
--- /dev/null
+++ b/apis/duck/v1/roundtrip_test.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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 v1
+
+import (
+	"testing"
+
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime"
+	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+	"knative.dev/pkg/apis/testing/roundtrip"
+)
+
+func TestEventingRoundTripTypesToJSON(t *testing.T) {
+	scheme := runtime.NewScheme()
+	utilruntime.Must(AddToScheme(scheme))
+
+	fuzzerFuncs := fuzzer.MergeFuzzerFuncs(
+		pkgfuzzer.Funcs,
+		FuzzerFuncs,
+	)
+	roundtrip.ExternalTypesViaJSON(t, scheme, fuzzerFuncs)
+}
diff --git a/apis/duck/v1alpha1/roundtrip_test.go b/apis/duck/v1alpha1/roundtrip_test.go
new file mode 100644
index 000000000..c40197e50
--- /dev/null
+++ b/apis/duck/v1alpha1/roundtrip_test.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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 v1alpha1
+
+import (
+	"testing"
+
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime"
+	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+	"knative.dev/pkg/apis/testing/roundtrip"
+)
+
+func TestEventingRoundTripTypesToJSON(t *testing.T) {
+	scheme := runtime.NewScheme()
+	utilruntime.Must(AddToScheme(scheme))
+
+	fuzzerFuncs := fuzzer.MergeFuzzerFuncs(
+		pkgfuzzer.Funcs,
+	)
+	roundtrip.ExternalTypesViaJSON(t, scheme, fuzzerFuncs)
+}
diff --git a/apis/duck/v1beta1/roundtrip_test.go b/apis/duck/v1beta1/roundtrip_test.go
new file mode 100644
index 000000000..f727740ae
--- /dev/null
+++ b/apis/duck/v1beta1/roundtrip_test.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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 v1beta1
+
+import (
+	"testing"
+
+	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
+	"k8s.io/apimachinery/pkg/runtime"
+	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+	pkgfuzzer "knative.dev/pkg/apis/testing/fuzzer"
+	"knative.dev/pkg/apis/testing/roundtrip"
+)
+
+func TestEventingRoundTripTypesToJSON(t *testing.T) {
+	scheme := runtime.NewScheme()
+	utilruntime.Must(AddToScheme(scheme))
+
+	fuzzerFuncs := fuzzer.MergeFuzzerFuncs(
+		pkgfuzzer.Funcs,
+		FuzzerFuncs,
+	)
+	roundtrip.ExternalTypesViaJSON(t, scheme, fuzzerFuncs)
+}
diff --git a/kvstore/kvstore_cm_test.go b/kvstore/kvstore_cm_test.go
index 4225e1ae0..abcb5cae5 100644
--- a/kvstore/kvstore_cm_test.go
+++ b/kvstore/kvstore_cm_test.go
@@ -46,7 +46,7 @@ type testClient struct {
 	clientset v1.CoreV1Interface
 }
 
-func NewTestClient(objects ...runtime.Object) *testClient {
+func newTestClient(objects ...runtime.Object) *testClient {
 	tc := testClient{}
 	cs := fake.NewSimpleClientset(objects...)
 	cs.PrependReactor("create", "*", func(action clientgotesting.Action) (handled bool, ret runtime.Object, err error) {
@@ -64,7 +64,7 @@ func NewTestClient(objects ...runtime.Object) *testClient {
 }
 
 func TestInitCreates(t *testing.T) {
-	tc := NewTestClient()
+	tc := newTestClient()
 	cs := NewConfigMapKVStore(context.Background(), name, namespace, tc.clientset)
 	err := cs.Init(context.Background())
 	if err != nil {
@@ -82,14 +82,14 @@ func TestInitCreates(t *testing.T) {
 }
 
 func TestLoadNonexisting(t *testing.T) {
-	tc := NewTestClient()
+	tc := newTestClient()
 	if NewConfigMapKVStore(context.Background(), name, namespace, tc.clientset).Load(context.Background()) == nil {
 		t.Error("non-existent store load didn't fail")
 	}
 }
 
 func TestInitLoads(t *testing.T) {
-	tc := NewTestClient([]runtime.Object{configMap(map[string]string{"foo": marshal(t, "bar")})}...)
+	tc := newTestClient([]runtime.Object{configMap(map[string]string{"foo": marshal(t, "bar")})}...)
 	cs := NewConfigMapKVStore(context.Background(), name, namespace, tc.clientset)
 	err := cs.Init(context.Background())
 	if err != nil {
@@ -115,7 +115,7 @@ func TestInitLoads(t *testing.T) {
 }
 
 func TestLoadSaveUpdate(t *testing.T) {
-	tc := NewTestClient([]runtime.Object{configMap(map[string]string{"foo": marshal(t, "bar")})}...)
+	tc := newTestClient([]runtime.Object{configMap(map[string]string{"foo": marshal(t, "bar")})}...)
 	cs := NewConfigMapKVStore(context.Background(), name, namespace, tc.clientset)
 	err := cs.Init(context.Background())
 	if err != nil {
@@ -145,7 +145,7 @@ func TestLoadSaveUpdateComplex(t *testing.T) {
 		Stuff:              []string{"first", "second", "third"},
 	}
 
-	tc := NewTestClient([]runtime.Object{configMap(map[string]string{"foo": marshal(t, &ts)})}...)
+	tc := newTestClient([]runtime.Object{configMap(map[string]string{"foo": marshal(t, &ts)})}...)
 	cs := NewConfigMapKVStore(context.Background(), name, namespace, tc.clientset)
 	err := cs.Init(context.Background())
 	if err != nil {
diff --git a/reconciler/retry_test.go b/reconciler/retry_test.go
index b10f41284..fb9f4d57d 100644
--- a/reconciler/retry_test.go
+++ b/reconciler/retry_test.go
@@ -81,7 +81,7 @@ func TestRetryUpdateConflicts(t *testing.T) {
 
 func TestRetryTestErrors(t *testing.T) {
 	errAny := errors.New("foo")
-	errGKE := errors.New(`Operation cannot be fulfilled on resourcequotas "gke-resource-quotas": StorageError: invalid object, Code: 4, Key: /registry/resourcequotas/serving-tests/gke-resource-quotas, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 7aaedbdf-caa8-41e7-94cb-f8c053038e86, UID in object meta:`)
+	errGKE := errors.New(`operation cannot be fulfilled on resourcequotas "gke-resource-quotas": StorageError: invalid object, Code: 4, Key: /registry/resourcequotas/serving-tests/gke-resource-quotas, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 7aaedbdf-caa8-41e7-94cb-f8c053038e86, UID in object meta`)
 	errEtcd := errors.New("etcdserver: request timed out")
 	errConflict := apierrs.NewConflict(v1.Resource("foo"), "bar", errAny)
 
diff --git a/test/gcs/gcs.go b/test/gcs/gcs.go
index 13ae206fa..f1b9a695a 100644
--- a/test/gcs/gcs.go
+++ b/test/gcs/gcs.go
@@ -31,6 +31,7 @@ import (
 	"google.golang.org/api/option"
 )
 
+//nolint — there's also Client so they collide.
 type GCSClient struct {
 	*storage.Client
 }
diff --git a/test/gcs/mock/errors.go b/test/gcs/mock/errors.go
index f8c58e434..fefda08c8 100644
--- a/test/gcs/mock/errors.go
+++ b/test/gcs/mock/errors.go
@@ -28,7 +28,7 @@ func (e *notEmptyBucketError) Error() string {
 	return fmt.Sprintf("bucket %q not empty, use force=true", e.bkt)
 }
 
-func NewNotEmptyBucketError(bkt string) *notEmptyBucketError {
+func NewNotEmptyBucketError(bkt string) error {
 	return &notEmptyBucketError{bkt}
 }
 
@@ -36,7 +36,7 @@ type noBucketError struct {
 	bkt string
 }
 
-func NewNoBucketError(bkt string) *noBucketError {
+func NewNoBucketError(bkt string) error {
 	return &noBucketError{bkt}
 }
 
@@ -48,7 +48,7 @@ type bucketExistError struct {
 	bkt string
 }
 
-func NewBucketExistError(bkt string) *bucketExistError {
+func NewBucketExistError(bkt string) error {
 	return &bucketExistError{bkt}
 }
 
@@ -62,7 +62,7 @@ type noObjectError struct {
 	path string
 }
 
-func NewNoObjectError(bkt, obj, path string) *noObjectError {
+func NewNoObjectError(bkt, obj, path string) error {
 	return &noObjectError{
 		bkt:  bkt,
 		obj:  obj,
diff --git a/test/gcs/mock/mock.go b/test/gcs/mock/mock.go
index 801b0f1e3..4af5aae66 100644
--- a/test/gcs/mock/mock.go
+++ b/test/gcs/mock/mock.go
@@ -65,13 +65,12 @@ type clientMocker struct {
 	revIndex map[bucket]project
 }
 
-func NewClientMocker() *clientMocker {
-	c := &clientMocker{
+func newClientMocker() *clientMocker {
+	return &clientMocker{
 		gcp:      make(map[project]*buckets),
 		err:      make(map[Method]*ReturnError),
 		revIndex: make(map[bucket]project),
 	}
-	return c
 }
 
 // SetError sets the number of calls of an interface function before an error is returned.
diff --git a/test/gcs/mock/mock_example_test.go b/test/gcs/mock/mock_example_test.go
index 0ddbcdaed..ef7ff43a5 100644
--- a/test/gcs/mock/mock_example_test.go
+++ b/test/gcs/mock/mock_example_test.go
@@ -57,7 +57,7 @@ func topFunction(c gcs.Client) error {
 }
 
 func Example_topFunction() {
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 
 	// Call to ReadObject, first call should return error, but returns nil
 	// because it is overridden.
diff --git a/test/gcs/mock/mock_test.go b/test/gcs/mock/mock_test.go
index 1c4570c65..c294c5f48 100644
--- a/test/gcs/mock/mock_test.go
+++ b/test/gcs/mock/mock_test.go
@@ -91,7 +91,7 @@ func TestSetError(t *testing.T) {
 
 	for _, tt := range testCases {
 		t.Run(tt.testname, func(t *testing.T) {
-			mockClient := NewClientMocker()
+			mockClient := newClientMocker()
 			mockClient.SetError(tt.m)
 
 			for k, v := range tt.m {
@@ -277,7 +277,7 @@ func TestClearError(t *testing.T) {
 
 	for _, tt := range testCases {
 		t.Run(tt.testname, func(t *testing.T) {
-			mockClient := NewClientMocker()
+			mockClient := newClientMocker()
 			mockClient.SetError(tt.m)
 			mockClient.ClearError()
 
@@ -338,7 +338,7 @@ func TestClearError(t *testing.T) {
 
 func TestNewStorageBucket(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	bktName2 := "test-bucket2"
@@ -406,7 +406,7 @@ func TestNewStorageBucket(t *testing.T) {
 
 func TestDeleteStorageBucket(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 
@@ -464,7 +464,7 @@ func TestDeleteStorageBucket(t *testing.T) {
 
 func TestExists(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	object1 := "object1"
@@ -522,7 +522,7 @@ func TestExists(t *testing.T) {
 
 func TestListChildrenFiles(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	dir1 := "dir"
@@ -586,7 +586,7 @@ func TestListChildrenFiles(t *testing.T) {
 
 func TestListDirectChildren(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	dir1 := "dir"
@@ -652,7 +652,7 @@ func TestListDirectChildren(t *testing.T) {
 
 func TestAttrObject(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	object1 := "dir/object1"
@@ -713,7 +713,7 @@ func TestAttrObject(t *testing.T) {
 
 func TestCopyObject(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	bktName2 := "test-bucket2"
 	project1 := "test-project1"
@@ -805,7 +805,7 @@ func TestCopyObject(t *testing.T) {
 
 func TestReadObject(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	object1 := "object1"
@@ -862,7 +862,7 @@ func TestReadObject(t *testing.T) {
 
 func TestWriteObject(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	badBkt := "non-existent-bucket"
@@ -924,7 +924,7 @@ func TestWriteObject(t *testing.T) {
 
 func TestDeleteObject(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	object1 := "dir/object1"
@@ -974,7 +974,7 @@ func TestDeleteObject(t *testing.T) {
 
 func TestDownload(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	object1 := "dir/object1"
@@ -1036,7 +1036,7 @@ func TestDownload(t *testing.T) {
 
 func TestUpload(t *testing.T) {
 	ctx := context.Background()
-	mockClient := NewClientMocker()
+	mockClient := newClientMocker()
 	bktName1 := "test-bucket1"
 	project1 := "test-project1"
 	object1 := "dir/object1"
diff --git a/test/logging/error.go b/test/logging/error.go
index e34916075..774a60612 100644
--- a/test/logging/error.go
+++ b/test/logging/error.go
@@ -77,7 +77,7 @@ func (e *structuredError) EnableValuePrinting() {
 
 // Create a StructuredError. Gives a little better logging when given to a TLogger.
 // This may prove to not be useful if users use the logger's WithValues() better.
-func Error(msg string, keysAndValues ...interface{}) *structuredError {
+func Error(msg string, keysAndValues ...interface{}) error {
 	return &structuredError{msg, keysAndValues, true}
 }
 
diff --git a/test/logging/tlogger.go b/test/logging/tlogger.go
index 6f58f3014..42891bc21 100644
--- a/test/logging/tlogger.go
+++ b/test/logging/tlogger.go
@@ -137,7 +137,7 @@ func validateKeysAndValues(keysAndValues ...interface{}) bool {
 		_, isField := keysAndValues[i].(zapcore.Field)
 		_, isString := keysAndValues[i].(string)
 		if isField {
-			i += 1
+			i++
 		} else if isString {
 			if i == length-1 {
 				return false
@@ -160,8 +160,7 @@ func (o *TLogger) interfacesToFields(things ...interface{}) []interface{} {
 	return fields
 }
 
-// nolint:stylecheck // Returning the error first is okay and expected here.
-func (o *TLogger) errorWithRuntimeCheck(stringThenKeysAndValues ...interface{}) (error, string, []interface{}) {
+func (o *TLogger) errorWithRuntimeCheck(stringThenKeysAndValues ...interface{}) (error, string, []interface{}) { //nolint Returning the error first is okay and expected here.
 	if len(stringThenKeysAndValues) == 0 {
 		return nil, "", nil
 	}
diff --git a/test/mako/analyzer.go b/test/mako/analyzer.go
index d581543b7..b945aa4e5 100644
--- a/test/mako/analyzer.go
+++ b/test/mako/analyzer.go
@@ -17,9 +17,9 @@ limitations under the License.
 package mako
 
 import (
-	"github.com/golang/protobuf/proto"
 	tpb "github.com/google/mako/clients/proto/analyzers/threshold_analyzer_go_proto"
 	mpb "github.com/google/mako/spec/proto/mako_go_proto"
+	"google.golang.org/protobuf/proto"
 )
 
 // NewCrossRunConfig returns a config that can be used in ThresholdAnalyzer.
diff --git a/test/mako/config/benchmark.go b/test/mako/config/benchmark.go
index 41d046865..8f22a865c 100644
--- a/test/mako/config/benchmark.go
+++ b/test/mako/config/benchmark.go
@@ -23,7 +23,7 @@ import (
 	"os"
 	"path/filepath"
 
-	"github.com/golang/protobuf/proto"
+	"github.com/golang/protobuf/proto" //nolint apis incompatible with the new version
 	mpb "github.com/google/mako/spec/proto/mako_go_proto"
 )
 
diff --git a/test/mako/stub-sidecar/main.go b/test/mako/stub-sidecar/main.go
index 540a208d6..8f7fe4101 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"
+	"github.com/golang/protobuf/jsonpb" //nolint: the newer package has differnet interface.
 	mako "github.com/google/mako/spec/proto/mako_go_proto"
 
 	"log"
diff --git a/testutils/clustermanager/e2e-tests/boskos/fake/fake.go b/testutils/clustermanager/e2e-tests/boskos/fake/fake.go
index bd434b34d..7f28ce7df 100644
--- a/testutils/clustermanager/e2e-tests/boskos/fake/fake.go
+++ b/testutils/clustermanager/e2e-tests/boskos/fake/fake.go
@@ -23,28 +23,26 @@ import (
 	boskoscommon "sigs.k8s.io/boskos/common"
 )
 
-const (
-	fakeOwner = "fake-owner"
-)
+const fakeOwner = "fake-owner"
 
-// FakeBoskosClient implements boskos.Operation
-type FakeBoskosClient struct {
+// BoskosClient implements boskos.Operation
+type BoskosClient struct {
 	resources []*boskoscommon.Resource
 }
 
-func (c *FakeBoskosClient) getOwner(host *string) string {
+func (c *BoskosClient) getOwner(host *string) string {
 	if host == nil {
 		return fakeOwner
 	}
 	return *host
 }
 
-func (c *FakeBoskosClient) GetResources() []*boskoscommon.Resource {
+func (c *BoskosClient) GetResources() []*boskoscommon.Resource {
 	return c.resources
 }
 
 // AcquireGKEProject fakes to be no op
-func (c *FakeBoskosClient) AcquireGKEProject(resType string) (*boskoscommon.Resource, error) {
+func (c *BoskosClient) AcquireGKEProject(resType string) (*boskoscommon.Resource, error) {
 	for _, res := range c.resources {
 		if res.State == boskoscommon.Free {
 			res.State = boskoscommon.Busy
@@ -57,7 +55,7 @@ func (c *FakeBoskosClient) AcquireGKEProject(resType string) (*boskoscommon.Reso
 }
 
 // ReleaseGKEProject fakes to be no op
-func (c *FakeBoskosClient) ReleaseGKEProject(name string) error {
+func (c *BoskosClient) ReleaseGKEProject(name string) error {
 	owner := c.getOwner(nil)
 	for _, res := range c.resources {
 		if res.Name == name {
@@ -73,7 +71,7 @@ func (c *FakeBoskosClient) ReleaseGKEProject(name string) error {
 }
 
 // NewGKEProject adds Boskos resources for testing purpose
-func (c *FakeBoskosClient) NewGKEProject(name string) {
+func (c *BoskosClient) NewGKEProject(name string) {
 	c.resources = append(c.resources, &boskoscommon.Resource{
 		Type:  boskos.GKEProjectResource,
 		Name:  name,
diff --git a/testutils/clustermanager/e2e-tests/gke_test.go b/testutils/clustermanager/e2e-tests/gke_test.go
index 6ee04488a..27219cac8 100644
--- a/testutils/clustermanager/e2e-tests/gke_test.go
+++ b/testutils/clustermanager/e2e-tests/gke_test.go
@@ -40,7 +40,7 @@ func setupFakeGKECluster() GKECluster {
 	return GKECluster{
 		Request:    &GKERequest{},
 		operations: gkeFake.NewGKESDKClient(),
-		boskosOps:  &boskosFake.FakeBoskosClient{},
+		boskosOps:  &boskosFake.BoskosClient{},
 	}
 }
 
@@ -600,7 +600,7 @@ func TestAcquire(t *testing.T) {
 			fgc := setupFakeGKECluster()
 			// Set up fake boskos
 			for _, bos := range data.boskosProjs {
-				fgc.boskosOps.(*boskosFake.FakeBoskosClient).NewGKEProject(bos)
+				fgc.boskosOps.(*boskosFake.BoskosClient).NewGKEProject(bos)
 			}
 			fgc.Request = &GKERequest{
 				Request: gke.Request{
@@ -783,9 +783,9 @@ func TestDelete(t *testing.T) {
 			}
 			// Set up fake boskos
 			for _, bos := range data.boskosState {
-				fgc.boskosOps.(*boskosFake.FakeBoskosClient).NewGKEProject(bos.Name)
+				fgc.boskosOps.(*boskosFake.BoskosClient).NewGKEProject(bos.Name)
 				// Acquire with default user
-				fgc.boskosOps.(*boskosFake.FakeBoskosClient).AcquireGKEProject(defaultResourceType)
+				fgc.boskosOps.(*boskosFake.BoskosClient).AcquireGKEProject(defaultResourceType)
 			}
 
 			err := fgc.Delete()
@@ -793,7 +793,7 @@ func TestDelete(t *testing.T) {
 			if data.cluster != nil {
 				gotCluster, _ = fgc.operations.GetCluster(fakeProj, data.cluster.Location, "", data.cluster.Name)
 			}
-			gotBoskos := fgc.boskosOps.(*boskosFake.FakeBoskosClient).GetResources()
+			gotBoskos := fgc.boskosOps.(*boskosFake.BoskosClient).GetResources()
 			errMsg := fmt.Sprintf("testing deleting cluster, with:\n\tIs Prow: '%v'\n\tIs Boskos: '%v'\n\t"+
 				"existing cluster: '%v'\n\tboskos state: '%v'",
 				data.isProw, data.isBoskos, data.cluster, data.boskosState)
diff --git a/testutils/clustermanager/perf-tests/pkg/cluster.go b/testutils/clustermanager/perf-tests/pkg/cluster.go
index 473f072ba..5bde7719b 100644
--- a/testutils/clustermanager/perf-tests/pkg/cluster.go
+++ b/testutils/clustermanager/perf-tests/pkg/cluster.go
@@ -47,12 +47,13 @@ var (
 	serviceAccount         = flag.String("service-account", "", "service account that will be used on this cluster")
 )
 
-type gkeClient struct {
+// GKEClient is the GKE adapter to operate clusters.
+type GKEClient struct {
 	ops gke.SDKOperations
 }
 
 // NewClient will create a new gkeClient.
-func NewClient(environment string) (*gkeClient, error) {
+func NewClient(environment string) (*GKEClient, error) {
 	endpoint, err := gke.ServiceEndpoint(environment)
 	if err != nil {
 		return nil, err
@@ -63,7 +64,7 @@ func NewClient(environment string) (*gkeClient, error) {
 		return nil, fmt.Errorf("failed to set up GKE client: %w", err)
 	}
 
-	client := &gkeClient{
+	client := &GKEClient{
 		ops: operations,
 	}
 	return client, nil
@@ -71,7 +72,7 @@ func NewClient(environment string) (*gkeClient, error) {
 
 // RecreateClusters will delete and recreate the existing clusters, it will also create the clusters if they do
 // not exist for the corresponding benchmarks.
-func (gc *gkeClient) RecreateClusters(gcpProject, repo, benchmarkRoot string) error {
+func (gc *GKEClient) RecreateClusters(gcpProject, repo, benchmarkRoot string) error {
 	handleExistingCluster := func(cluster container.Cluster, configExists bool, config ClusterConfig) error {
 		// always delete the cluster, even if the cluster config is unchanged
 		return gc.handleExistingClusterHelper(gcpProject, cluster, configExists, config, false)
@@ -90,7 +91,7 @@ func (gc *gkeClient) RecreateClusters(gcpProject, repo, benchmarkRoot string) er
 // 2. If the benchmark's config is changed, delete the old cluster and create a new one with the new config
 // 3. If the benchmark is renamed, delete the old cluster and create a new one with the new name
 // 4. If the benchmark is deleted, delete the corresponding cluster
-func (gc *gkeClient) ReconcileClusters(gcpProject, repo, benchmarkRoot string) error {
+func (gc *GKEClient) ReconcileClusters(gcpProject, repo, benchmarkRoot string) error {
 	handleExistingCluster := func(cluster container.Cluster, configExists bool, config ClusterConfig) error {
 		// retain the cluster, if the cluster config is unchanged
 		return gc.handleExistingClusterHelper(gcpProject, cluster, configExists, config, true)
@@ -103,7 +104,7 @@ func (gc *gkeClient) ReconcileClusters(gcpProject, repo, benchmarkRoot string) e
 }
 
 // DeleteClusters will delete all existing clusters.
-func (gc *gkeClient) DeleteClusters(gcpProject, repo, benchmarkRoot string) error {
+func (gc *GKEClient) DeleteClusters(gcpProject, repo, benchmarkRoot string) error {
 	handleExistingCluster := func(cluster container.Cluster, configExists bool, config ClusterConfig) error {
 		// retain the cluster, if the cluster config is unchanged
 		return gc.deleteClusterWithRetries(gcpProject, cluster)
@@ -117,7 +118,7 @@ func (gc *gkeClient) DeleteClusters(gcpProject, repo, benchmarkRoot string) erro
 
 // processClusters will process existing clusters and configs for new clusters,
 // with the corresponding functions provided by callers.
-func (gc *gkeClient) processClusters(
+func (gc *GKEClient) processClusters(
 	gcpProject, repo, benchmarkRoot string,
 	handleExistingCluster func(cluster container.Cluster, configExists bool, config ClusterConfig) error,
 	handleNewClusterConfig func(name string, config ClusterConfig) error,
@@ -173,7 +174,7 @@ func (gc *gkeClient) processClusters(
 }
 
 // handleExistingClusterHelper is a helper function for handling an existing cluster.
-func (gc *gkeClient) handleExistingClusterHelper(
+func (gc *GKEClient) handleExistingClusterHelper(
 	gcpProject string,
 	cluster container.Cluster, configExists bool, config ClusterConfig,
 	retainIfUnchanged bool,
@@ -208,7 +209,7 @@ func (gc *gkeClient) handleExistingClusterHelper(
 }
 
 // listClustersForRepo will list all the clusters under the gcpProject that belong to the given repo.
-func (gc *gkeClient) listClustersForRepo(gcpProject, repo string) ([]container.Cluster, error) {
+func (gc *GKEClient) listClustersForRepo(gcpProject, repo string) ([]container.Cluster, error) {
 	allClusters, err := gc.ops.ListClustersInProject(gcpProject)
 	if err != nil {
 		return nil, fmt.Errorf("failed listing clusters in project %q: %w", gcpProject, err)
@@ -226,7 +227,7 @@ func (gc *gkeClient) listClustersForRepo(gcpProject, repo string) ([]container.C
 // deleteClusterWithRetries will delete the given cluster,
 // and retry for a maximum of retryTimes if there is an error.
 // TODO(chizhg): maybe move it to clustermanager library.
-func (gc *gkeClient) deleteClusterWithRetries(gcpProject string, cluster container.Cluster) error {
+func (gc *GKEClient) deleteClusterWithRetries(gcpProject string, cluster container.Cluster) error {
 	log.Printf("Deleting cluster %q under project %q", cluster.Name, gcpProject)
 	region, zone := gke.RegionZoneFromLoc(cluster.Location)
 	var err error
@@ -247,7 +248,7 @@ func (gc *gkeClient) deleteClusterWithRetries(gcpProject string, cluster contain
 // createClusterWithRetries will create a new cluster with the given config,
 // and retry for a maximum of retryTimes if there is an error.
 // TODO(chizhg): maybe move it to clustermanager library.
-func (gc *gkeClient) createClusterWithRetries(gcpProject, name string, config ClusterConfig) error {
+func (gc *GKEClient) createClusterWithRetries(gcpProject, name string, config ClusterConfig) error {
 	log.Printf("Creating cluster %q under project %q with config %v", name, gcpProject, config)
 	var addons []string
 	if strings.TrimSpace(config.Addons) != "" {
diff --git a/testutils/clustermanager/perf-tests/pkg/cluster_test.go b/testutils/clustermanager/perf-tests/pkg/cluster_test.go
index af30d127a..34f1e10c8 100644
--- a/testutils/clustermanager/perf-tests/pkg/cluster_test.go
+++ b/testutils/clustermanager/perf-tests/pkg/cluster_test.go
@@ -34,8 +34,8 @@ const (
 	testBenchmarkRoot = "testdir"
 )
 
-func setupFakeGKEClient() gkeClient {
-	return gkeClient{
+func setupFakeGKEClient() GKEClient {
+	return GKEClient{
 		ops: gkeFake.NewGKESDKClient(),
 	}
 }
diff --git a/webhook/resourcesemantics/defaulting/defaulting_test.go b/webhook/resourcesemantics/defaulting/defaulting_test.go
index 9e678dc18..a30dc4105 100644
--- a/webhook/resourcesemantics/defaulting/defaulting_test.go
+++ b/webhook/resourcesemantics/defaulting/defaulting_test.go
@@ -99,13 +99,13 @@ var (
 
 func newNonRunningTestResourceAdmissionController(t *testing.T) (
 	kubeClient *fakekubeclientset.Clientset,
-	ac *reconciler) {
+	ac webhook.AdmissionController) {
 
 	t.Helper()
 	// Create fake clients
 	kubeClient = fakekubeclientset.NewSimpleClientset(initialResourceWebhook)
 
-	ac = NewTestResourceAdmissionController(t)
+	ac = newTestResourceAdmissionController(t)
 	return
 }
 
@@ -505,7 +505,7 @@ func createInnerDefaultResourceWithoutSpec(t *testing.T) []byte {
 	return b
 }
 
-func NewTestResourceAdmissionController(t *testing.T) *reconciler {
+func newTestResourceAdmissionController(t *testing.T) webhook.AdmissionController {
 	ctx, _ := SetupFakeContext(t)
 	ctx = webhook.WithOptions(ctx, webhook.Options{
 		SecretName: "webhook-secret",
diff --git a/webhook/resourcesemantics/validation/validation_admit_test.go b/webhook/resourcesemantics/validation/validation_admit_test.go
index 1c906c5a2..fdd36dad0 100644
--- a/webhook/resourcesemantics/validation/validation_admit_test.go
+++ b/webhook/resourcesemantics/validation/validation_admit_test.go
@@ -115,13 +115,13 @@ var (
 
 func newNonRunningTestResourceAdmissionController(t *testing.T) (
 	kubeClient *fakekubeclientset.Clientset,
-	ac *reconciler) {
+	ac webhook.AdmissionController) {
 
 	t.Helper()
 	// Create fake clients
 	kubeClient = fakekubeclientset.NewSimpleClientset(initialResourceWebhook)
 
-	ac = NewTestResourceAdmissionController(t)
+	ac = newTestResourceAdmissionController(t)
 	return
 }
 
@@ -631,7 +631,7 @@ func TestNewResourceAdmissionControllerDuplciateVerb(t *testing.T) {
 		call)
 }
 
-func NewTestResourceAdmissionController(t *testing.T) *reconciler {
+func newTestResourceAdmissionController(t *testing.T) webhook.AdmissionController {
 	ctx, _ := SetupFakeContext(t)
 	ctx = webhook.WithOptions(ctx, webhook.Options{
 		SecretName: "webhook-secret",