plant

package
v1.7.1-0...-23dd39d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the name of this admission plugin.
	PluginName = "PlantValidator"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(config io.Reader) (admission.Interface, error)

NewFactory creates a new PluginFactory.

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin.

Types

type Handler

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

Handler contains gardenlisters and and admission handler.

func New

func New() (*Handler, error)

New creates a new Handler admission plugin.

func (*Handler) Admit

Admit ensures that the plant is correctly annotated

func (*Handler) AssignReadyFunc

func (a *Handler) AssignReadyFunc(f admission.ReadyFunc)

AssignReadyFunc assigns the ready function to the admission handler.

func (*Handler) SetInternalCoreInformerFactory

func (a *Handler) SetInternalCoreInformerFactory(i gardencoreinformers.SharedInformerFactory)

SetInternalCoreInformerFactory gets the garden core informer factory and adds it.

func (*Handler) Validate

Validate makes admissions decisions based on the resources specified in a Plant object. It does reject the request if there another plant managing the cluster, if the plant name is invalid or the project that contains the plant resource is deleted

func (*Handler) ValidateInitialization

func (a *Handler) ValidateInitialization() error

ValidateInitialization checks whether the plugin was correctly initialized.

Jump to

Keyboard shortcuts

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