Version: v1.10.0-alpha.1 Latest Latest

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

Go to latest
Published: Dec 18, 2017 License: Apache-2.0, Apache-2.0 Imports: 27 Imported by: 0



Package mutating delegates admission checks to dynamically configured mutating webhooks.

Package mutating makes calls to mutating webhooks during the admission process.



View Source
const (
	// Name of admission plug-in
	PluginName = "MutatingAdmissionWebhook"


This section is empty.


func Register

func Register(plugins *admission.Plugins)

Register registers a plugin


type MutatingWebhook

type MutatingWebhook struct {
	// contains filtered or unexported fields

MutatingWebhook is an implementation of admission.Interface.

func NewMutatingWebhook

func NewMutatingWebhook(configFile io.Reader) (*MutatingWebhook, error)

NewMutatingWebhook returns a generic admission webhook plugin.

func (*MutatingWebhook) Admit

func (a *MutatingWebhook) Admit(attr admission.Attributes) error

Admit makes an admission decision based on the request attributes.

func (*MutatingWebhook) SetAuthenticationInfoResolverWrapper

func (a *MutatingWebhook) SetAuthenticationInfoResolverWrapper(wrapper config.AuthenticationInfoResolverWrapper)

TODO find a better way wire this, but keep this pull small for now.

func (*MutatingWebhook) SetExternalKubeClientSet

func (a *MutatingWebhook) SetExternalKubeClientSet(client clientset.Interface)

WantsExternalKubeClientSet defines a function which sets external ClientSet for admission plugins that need it

func (*MutatingWebhook) SetExternalKubeInformerFactory

func (a *MutatingWebhook) SetExternalKubeInformerFactory(f informers.SharedInformerFactory)

SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface.

func (*MutatingWebhook) SetScheme

func (a *MutatingWebhook) SetScheme(scheme *runtime.Scheme)

SetScheme sets a serializer(NegotiatedSerializer) which is derived from the scheme

func (*MutatingWebhook) SetServiceResolver

func (a *MutatingWebhook) SetServiceResolver(sr config.ServiceResolver)

SetServiceResolver sets a service resolver for the webhook admission plugin. Passing a nil resolver does not have an effect, instead a default one will be used.

func (*MutatingWebhook) ValidateInitialization

func (a *MutatingWebhook) ValidateInitialization() error

ValidateInitialization implements the InitializationValidator interface.

type WebhookSource

type WebhookSource interface {
	Run(stopCh <-chan struct{})
	Webhooks() (*v1beta1.MutatingWebhookConfiguration, error)

WebhookSource can list dynamic webhook plugins.

Jump to

Keyboard shortcuts

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