Skip to content

Commit 31c6c99

Browse files
committed
feedback
1 parent 8f65834 commit 31c6c99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/builder/webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func WebhookManagedBy[T runtime.Object](m manager.Manager, object T) *WebhookBui
6464

6565
// WithCustomDefaulter takes an admission.CustomDefaulter interface, a MutatingWebhook with the provided opts (admission.DefaulterOption)
6666
// will be wired for this type.
67-
// Deprecated: Use WithAdmissionDefaulter instead.
67+
// Deprecated: Use WithDefaulter instead.
6868
func (blder *WebhookBuilder[T]) WithCustomDefaulter(defaulter admission.CustomDefaulter, opts ...admission.DefaulterOption) *WebhookBuilder[T] {
6969
blder.customDefaulter = defaulter
7070
blder.customDefaulterOpts = opts
@@ -79,7 +79,7 @@ func (blder *WebhookBuilder[T]) WithDefaulter(defaulter admission.Defaulter[T],
7979
}
8080

8181
// WithCustomValidator takes a admission.CustomValidator interface, a ValidatingWebhook will be wired for this type.
82-
// Deprecated: Use WithAdmissionValidator instead.
82+
// Deprecated: Use WithValidator instead.
8383
func (blder *WebhookBuilder[T]) WithCustomValidator(validator admission.CustomValidator) *WebhookBuilder[T] {
8484
blder.customValidator = validator
8585
return blder

pkg/builder/webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ func (*testValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *TestVa
12361236
return nil, errors.New("number of replica should be greater than or equal to 0")
12371237
}
12381238
if newObj.Replica < oldObj.Replica {
1239-
return nil, fmt.Errorf("new replica %v should not be fewer than old replica %v", oldObj.Replica, newObj.Replica)
1239+
return nil, fmt.Errorf("new replica %v should not be fewer than old replica %v", newObj.Replica, oldObj.Replica)
12401240
}
12411241

12421242
userAgent, ok := ctx.Value(userAgentCtxKey).(string)

0 commit comments

Comments
 (0)