mutating

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: Apache-2.0, Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package mutating delegates admission checks to dynamically configured mutating webhooks.

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

Index

Constants

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

Variables

This section is empty.

Functions

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type MutatingWebhook

type MutatingWebhook struct {
	*admission.Handler
	// 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 {
	Webhooks() *v1beta1.MutatingWebhookConfiguration
}

WebhookSource can list dynamic webhook plugins.

Jump to

Keyboard shortcuts

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