validating

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: Apache-2.0, Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package validating delegates admission checks to dynamically configured validating webhooks.

Package validating makes calls to validating (i.e., non-mutating) webhooks during the admission process.

Index

Constants

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

Variables

This section is empty.

Functions

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type ValidatingAdmissionWebhook

type ValidatingAdmissionWebhook struct {
	*admission.Handler
	// contains filtered or unexported fields
}

ValidatingAdmissionWebhook is an implementation of admission.Interface.

func NewValidatingAdmissionWebhook

func NewValidatingAdmissionWebhook(configFile io.Reader) (*ValidatingAdmissionWebhook, error)

NewValidatingAdmissionWebhook returns a generic admission webhook plugin.

func (*ValidatingAdmissionWebhook) SetAuthenticationInfoResolverWrapper

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

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

func (*ValidatingAdmissionWebhook) SetExternalKubeClientSet

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

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

func (*ValidatingAdmissionWebhook) SetExternalKubeInformerFactory

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

SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface.

func (*ValidatingAdmissionWebhook) SetScheme

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

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

func (*ValidatingAdmissionWebhook) SetServiceResolver

func (a *ValidatingAdmissionWebhook) 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 (*ValidatingAdmissionWebhook) Validate

Validate makes an admission decision based on the request attributes.

func (*ValidatingAdmissionWebhook) ValidateInitialization

func (a *ValidatingAdmissionWebhook) ValidateInitialization() error

ValidateInitialization implements the InitializationValidator interface.

type WebhookSource

type WebhookSource interface {
	Run(stopCh <-chan struct{})
	Webhooks() (*v1beta1.ValidatingWebhookConfiguration, 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