admission

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SidecarInjectPluginName = "SidecarInject"
)

Variables

View Source
var (
	DefaultOnPlugins = map[string]bool{
		SidecarInjectPluginName: true,
	}
)

Functions

This section is empty.

Types

type DispatchHandler

type DispatchHandler interface {
	Handle(context.Context, admission.Request) admission.Response
}

type Interface

type Interface interface {
	Name() string
}

Interface is an abstract, pluggable interface for Admission Control decisions.

type MutationFunc

type MutationFunc func(ctx context.Context, req admission.Request, obj runtime.Object) error

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Admit

func (p *Plugin) Admit(ctx context.Context, req admission.Request, obj runtime.Object) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Validate

func (p *Plugin) Validate(ctx context.Context, req admission.Request, obj runtime.Object) error

type PluginInterface

type PluginInterface interface {
	Interface
	// Validate makes an admission decision based on the request attributes.  It is NOT allowed to mutate
	Validate(ctx context.Context, req admission.Request, obj runtime.Object) error
	// Admit makes an admission decision based on the request attributes
	Admit(ctx context.Context, req admission.Request, obj runtime.Object) error
}

func NewPlugin

func NewPlugin(pluginName string, vf ValidationFunc, mf MutationFunc) PluginInterface

type ValidationFunc

type ValidationFunc func(ctx context.Context, req admission.Request, obj runtime.Object) error

Jump to

Keyboard shortcuts

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