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 ¶
func (blder *WebhookBuilder) Complete() (hooks.AdmissionHook, hooks.AdmissionHook, 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.
Click to show internal directories.
Click to hide internal directories.