const ( // PluginName is the name of this admission plugin. PluginName = "PlantValidator" )
NewFactory creates a new PluginFactory.
Register registers a plugin.
Handler contains gardenlisters and and admission handler.
New creates a new Handler admission plugin.
func (a *Handler) Admit(ctx context.Context, attrs admission.Attributes, o admission.ObjectInterfaces) error
Admit ensures that the plant is correctly annotated
AssignReadyFunc assigns the ready function to the admission handler.
SetInternalCoreInformerFactory gets the garden core informer factory and adds it.
func (a *Handler) Validate(ctx context.Context, attrs admission.Attributes, o admission.ObjectInterfaces) error
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
ValidateInitialization checks whether the plugin was correctly initialized.