Documentation ¶
Index ¶
- Constants
- func NewFactory(config io.Reader) (admission.Interface, error)
- func Register(plugins *admission.Plugins)
- type Handler
- func (a *Handler) Admit(ctx context.Context, attrs admission.Attributes, o admission.ObjectInterfaces) error
- func (a *Handler) AssignReadyFunc(f admission.ReadyFunc)
- func (a *Handler) SetInternalCoreInformerFactory(i gardencoreinformers.SharedInformerFactory)
- func (a *Handler) Validate(ctx context.Context, attrs admission.Attributes, o admission.ObjectInterfaces) error
- func (a *Handler) ValidateInitialization() error
Constants ¶
View Source
const (
// PluginName is the name of this admission plugin.
PluginName = "PlantValidator"
)
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory creates a new PluginFactory.
Types ¶
type Handler ¶
Handler contains gardenlisters and and admission handler.
func (*Handler) Admit ¶
func (a *Handler) Admit(ctx context.Context, attrs admission.Attributes, o admission.ObjectInterfaces) error
Admit ensures that the plant is correctly annotated
func (*Handler) AssignReadyFunc ¶
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 ¶
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
func (*Handler) ValidateInitialization ¶
ValidateInitialization checks whether the plugin was correctly initialized.
Click to show internal directories.
Click to hide internal directories.