Skip to content

Commit

Permalink
--amend
Browse files Browse the repository at this point in the history
  • Loading branch information
alculquicondor committed Aug 23, 2024
1 parent 1342092 commit ab06f04
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/builder/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ func (blder *WebhookBuilder) getDefaultingWebhook() *admission.Webhook {
} else if defaulter, ok := blder.apiType.(admission.Defaulter); ok {
w = admission.DefaultingWebhookFor(blder.mgr.GetScheme(), defaulter)
}
if w == nil {
log.Info(
"Skip registering a mutating webhook, object does not implement admission.Defaulter or WithDefaulter wasn't called",
"GVK", blder.gvk)
return nil
}
if blder.recoverPanic != nil {
w = w.WithRecoverPanic(*blder.recoverPanic)
}
if w != nil {
return w
}
log.Info(
"skip registering a mutating webhook, object does not implement admission.Defaulter or WithDefaulter wasn't called",
"GVK", blder.gvk)
return nil
return w
}

// registerValidatingWebhook registers a validating webhook if necessary.
Expand Down

0 comments on commit ab06f04

Please sign in to comment.