webhook

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL