Documentation ¶
Overview ¶
Package minerset contains an admission controller that modifies and validation every new MinerSet.
Index ¶
- Constants
- func Register(plugins *admission.Plugins)
- type Plugin
- func (p *Plugin) Admit(ctx context.Context, attributes admission.Attributes, ...) (err error)
- func (p *Plugin) SetExternalClientSet(client clientset.Interface)
- func (p *Plugin) SetExternalInformerFactory(f informers.SharedInformerFactory)
- func (p *Plugin) Validate(ctx context.Context, attributes admission.Attributes, ...) (err error)
- func (p *Plugin) ValidateInitialization() error
Constants ¶
const PluginName = "MinerSet"
PluginName indicates name of admission plugin.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
Plugin is an implementation of admission.Interface. It is validation and mutation plugin for MinerSet resource.
func NewPlugin ¶
func NewPlugin() *Plugin
NewPlugin creates a new always minerset admission control handler.
func (*Plugin) Admit ¶
func (p *Plugin) Admit(ctx context.Context, attributes admission.Attributes, o admission.ObjectInterfaces) (err error)
Admit makes an admission decision based on the request attributes
func (*Plugin) SetExternalClientSet ¶
SetExternalClientSet implements the WantsExternalClientSet interface.
func (*Plugin) SetExternalInformerFactory ¶
func (p *Plugin) SetExternalInformerFactory(f informers.SharedInformerFactory)
SetExternalInformerFactory gets Lister from SharedInformerFactory. The lister knows how to lists MinerSets.
func (*Plugin) Validate ¶
func (p *Plugin) Validate(ctx context.Context, attributes admission.Attributes, o admission.ObjectInterfaces) (err error)
Validate do some validation on MinerSet.
func (*Plugin) ValidateInitialization ¶
ValidateInitialization checks whether the plugin was correctly initialized.