Documentation ¶
Index ¶
- Constants
- func NewFactory(config io.Reader) (admission.Interface, error)
- func Register(plugins *admission.Plugins)
- type AdmitPlant
- func (a *AdmitPlant) Admit(attrs admission.Attributes, o admission.ObjectInterfaces) error
- func (a *AdmitPlant) AssignReadyFunc(f admission.ReadyFunc)
- func (a *AdmitPlant) SetInternalCoreInformerFactory(i gardencoreinformers.SharedInformerFactory)
- func (a *AdmitPlant) SetInternalGardenInformerFactory(i gardeninformers.SharedInformerFactory)
- func (a *AdmitPlant) Validate(attrs admission.Attributes, o admission.ObjectInterfaces) error
- func (a *AdmitPlant) ValidateInitialization() error
Constants ¶
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 AdmitPlant ¶
AdmitPlant contains gardenlisters and and admission handler.
func (*AdmitPlant) Admit ¶
func (a *AdmitPlant) Admit(attrs admission.Attributes, o admission.ObjectInterfaces) error
Admit ensures that the plant is correctly annotated
func (*AdmitPlant) AssignReadyFunc ¶
func (a *AdmitPlant) AssignReadyFunc(f admission.ReadyFunc)
AssignReadyFunc assigns the ready function to the admission handler.
func (*AdmitPlant) SetInternalCoreInformerFactory ¶
func (a *AdmitPlant) SetInternalCoreInformerFactory(i gardencoreinformers.SharedInformerFactory)
SetInternalCoreInformerFactory gets the garden core informer factory and adds it.
func (*AdmitPlant) SetInternalGardenInformerFactory ¶
func (a *AdmitPlant) SetInternalGardenInformerFactory(i gardeninformers.SharedInformerFactory)
SetInternalGardenInformerFactory gets the garden informer factory and adds it.
func (*AdmitPlant) Validate ¶
func (a *AdmitPlant) Validate(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 (*AdmitPlant) ValidateInitialization ¶
func (a *AdmitPlant) ValidateInitialization() error
ValidateInitialization checks whether the plugin was correctly initialized.