Skip to content

Commit 7a149e8

Browse files
committed
Preserve alias for NewWebhookManagedBy
1 parent 3cc1910 commit 7a149e8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

alias.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ var (
154154
SetLogger = log.SetLogger
155155
)
156156

157-
// WebhookManagedBy returns a new webhook builder for the provided type T.
158-
func WebhookManagedBy[T runtime.Object](mgr manager.Manager, obj T) *builder.WebhookBuilder[T] {
157+
// NewWebhookManagedBy returns a new webhook builder for the provided type T.
158+
func NewWebhookManagedBy[T runtime.Object](mgr manager.Manager, obj T) *builder.WebhookBuilder[T] {
159159
return builder.WebhookManagedBy(mgr, obj)
160160
}

examples/builtins/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func main() {
6060
os.Exit(1)
6161
}
6262

63-
if err := ctrl.WebhookManagedBy(mgr, &corev1.Pod{}).
63+
if err := ctrl.NewWebhookManagedBy(mgr, &corev1.Pod{}).
6464
WithAdmissionDefaulter(&podAnnotator{}).
6565
WithAdmissionValidator(&podValidator{}).
6666
Complete(); err != nil {

examples/crd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func main() {
129129
os.Exit(1)
130130
}
131131

132-
err = ctrl.WebhookManagedBy(mgr, &api.ChaosPod{}).
132+
err = ctrl.NewWebhookManagedBy(mgr, &api.ChaosPod{}).
133133
Complete()
134134
if err != nil {
135135
setupLog.Error(err, "unable to create webhook")

0 commit comments

Comments
 (0)