builder

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 14

Documentation

Index

Constants

View Source
const (
	ResourceSuffixPlural   = "webhooks"
	ResourceSuffixSingular = "webhook"
)

Variables

This section is empty.

Functions

func MutatorResource

func MutatorResource(gk schema.GroupKind) (plural schema.GroupVersionResource, singular string)

func ValidatorResource

func ValidatorResource(gv schema.GroupKind) (plural schema.GroupVersionResource, singular string)

Types

type GroupPrefix

type GroupPrefix string
const (
	MutatorGroupPrefix   GroupPrefix = "mutators."
	ValidatorGroupPrefix GroupPrefix = "validators."
)

type WebhookBuilder

type WebhookBuilder struct {
	// contains filtered or unexported fields
}

WebhookBuilder builds a Webhook.

func WebhookManagedBy

func WebhookManagedBy(s *runtime.Scheme) *WebhookBuilder

WebhookManagedBy allows inform its Scheme and RESTMapper.

func (*WebhookBuilder) Complete

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.

Jump to

Keyboard shortcuts

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