Documentation ¶
Index ¶
- func WithLosslessDefaulter(scheme *runtime.Scheme, obj runtime.Object, ...) admission.Handler
- type WebhookBuilder
- func (blder *WebhookBuilder) Complete() error
- func (blder *WebhookBuilder) For(apiType runtime.Object) *WebhookBuilder
- func (blder *WebhookBuilder) RecoverPanic(recoverPanic bool) *WebhookBuilder
- func (blder *WebhookBuilder) WithLogConstructor(logConstructor func(base logr.Logger, req *admission.Request) logr.Logger) *WebhookBuilder
- func (blder *WebhookBuilder) WithMutationHandler(h admission.Handler) *WebhookBuilder
- func (blder *WebhookBuilder) WithValidator(validator admission.CustomValidator) *WebhookBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLosslessDefaulter ¶
func WithLosslessDefaulter(scheme *runtime.Scheme, obj runtime.Object, defaulter admission.CustomDefaulter) admission.Handler
WithLosslessDefaulter creates a new Handler for a CustomDefaulter interface that **drops** remove operations, which are typically the result of new API fields not present in Kueue libraries.
Types ¶
type WebhookBuilder ¶
type WebhookBuilder struct {
// contains filtered or unexported fields
}
WebhookBuilder builds a Webhook.
func WebhookManagedBy ¶
func WebhookManagedBy(m manager.Manager) *WebhookBuilder
WebhookManagedBy returns a new webhook builder.
func (*WebhookBuilder) Complete ¶
func (blder *WebhookBuilder) Complete() error
Complete builds the webhook.
func (*WebhookBuilder) For ¶
func (blder *WebhookBuilder) For(apiType runtime.Object) *WebhookBuilder
For takes a runtime.Object which should be a CR. If the given object implements the admission.Defaulter interface, a MutatingWebhook will be wired for this type. If the given object implements the admission.Validator interface, a ValidatingWebhook will be wired for this type.
func (*WebhookBuilder) RecoverPanic ¶
func (blder *WebhookBuilder) RecoverPanic(recoverPanic bool) *WebhookBuilder
RecoverPanic indicates whether panics caused by the webhook should be recovered. Defaults to true.
func (*WebhookBuilder) WithLogConstructor ¶
func (blder *WebhookBuilder) WithLogConstructor(logConstructor func(base logr.Logger, req *admission.Request) logr.Logger) *WebhookBuilder
WithLogConstructor overrides the webhook's LogConstructor.
func (*WebhookBuilder) WithMutationHandler ¶
func (blder *WebhookBuilder) WithMutationHandler(h admission.Handler) *WebhookBuilder
WithDefaulter takes an admission.CustomDefaulter interface, a MutatingWebhook will be wired for this type.
func (*WebhookBuilder) WithValidator ¶
func (blder *WebhookBuilder) WithValidator(validator admission.CustomValidator) *WebhookBuilder
WithValidator takes a admission.CustomValidator interface, a ValidatingWebhook will be wired for this type.