Versions in this module Expand all Collapse all v1 v1.0.2 Nov 25, 2025 v1.0.1 Nov 25, 2025 v1.0.0 Sep 18, 2025 Changes in this version + const CREATE + const DELETE + const DefaultWebhookTimeoutSeconds + const JSONPatchAddOperation + const JSONPatchRemoveOperation + const JSONPatchReplaceOperation + const MutatingWebhookBasePath + const UPDATE + const ValidatingWebhookBasePath + func AllOperations() []admissionregistrationv1.OperationType + func ApplyWebhooks(ctx context.Context, opts *ApplyWebhooksOptions) error + func DeleteWebhookConfiguration(ctx context.Context, wt WebhookType, kubeClient client.Client, name string) error + func GeDNSNamesFromNamespacedName(namespace, name string) []string + func GenerateCertificates(ctx context.Context, kubeClient client.Client, ...) (*certificates.Certificate, *certificates.Certificate, error) + func GetCachelessClient(restConfig *rest.Config, installFuncs ...func(*runtime.Scheme)) (client.Client, error) + func GetDNSNamesFromURL(rawurl string) ([]string, error) + func Operations(ops ...admissionregistrationv1.OperationType) []admissionregistrationv1.OperationType + func StringArrayIncludes(list []string, expects ...string) bool + func UpdateWebhookConfiguration(ctx context.Context, wt WebhookType, kubeClient client.Client, ...) error + type ApplyWebhooksOptions struct + CACert *certificates.Certificate + CertDir string + CertName string + Client client.Client + Flags *WebhookFlags + NameMutating *WebhookNaming + NameValidating *WebhookNaming + Registry WebhookRegistry + Server ctrlwebhook.Server + ServerCert *certificates.Certificate + type ClusterID struct + ID string + Name string + func ID(id, name string) *ClusterID + type ConfigOptions struct + CABundle []byte + Service *WebhookServiceOptions + WebhookConfigurationName string + WebhookNameSuffix string + WebhookURL string + type MultiWebhookFlags struct + CertNamespace string + WebhookService *WebhookServiceOptions + WebhookServiceNamespaceName string + WebhookServicePort int32 + WebhookURL string + type Webhook struct + APIGroup string + APIVersions []string + Decoder runtime.Decoder + LabelSelector *metav1.LabelSelector + Labels map[string]string + Log logging.Logger + Name string + Operations []admissionregistrationv1.OperationType + Process WebhookLogic + ResourceName string + Timeout int + Type WebhookType + func (w *Webhook) Handle(ctx context.Context, req admission.Request) admission.Response + func (w *Webhook) Initialize(log logging.Logger, scheme *runtime.Scheme) error + func (w *Webhook) Path() string + type WebhookFlags struct + DisabledWebhooks sets.Set[string] + DisabledWebhooksRaw string + MultiCluster map[*ClusterID]*MultiWebhookFlags + Port int + func NewWebhookFlags(clusters ...*ClusterID) *WebhookFlags + func (wf *WebhookFlags) AddFlags(fs *flag.FlagSet) + func (wf *WebhookFlags) Complete(wr WebhookRegistry) error + func (wf *WebhookFlags) ForSingleCluster(cid *ClusterID) (*WebhookFlags, error) + func (wf *WebhookFlags) IsMultiCluster() bool + type WebhookLogic func(context.Context, admission.Request, runtime.Decoder) admission.Response + type WebhookNaming struct + Name string + WebhookSuffix string + type WebhookRegistry map[string]*Webhook + func NewWebhookRegistry() WebhookRegistry + func Registry() WebhookRegistry + func (wr WebhookRegistry) AddToServer(ctx context.Context, webhookServer ctrlwebhook.Server, scheme *runtime.Scheme) error + func (wr WebhookRegistry) Filter(filters ...WebhookRegistryFilter) WebhookRegistry + func (wr WebhookRegistry) GetEnabledWebhooks(disabled sets.Set[string]) WebhookRegistry + func (wr WebhookRegistry) InitializeAll(ctx context.Context, scheme *runtime.Scheme) error + func (wr WebhookRegistry) Register(webhook *Webhook) WebhookRegistry + type WebhookRegistryFilter func(*Webhook) bool + func LabelFilter(key string, value *string) WebhookRegistryFilter + func MutatingWebhooksFilter() WebhookRegistryFilter + func Not(f WebhookRegistryFilter) WebhookRegistryFilter + func ValidatingWebhooksFilter() WebhookRegistryFilter + type WebhookServiceOptions struct + Name string + Namespace string + Port int32 + type WebhookType string + const MutatingWebhook + const ValidatingWebhook