gardener: github.com/gardener/gardener/plugin/pkg/plant Index | Files

package plant

import "github.com/gardener/gardener/plugin/pkg/plant"

Index

Package Files

admission.go

Constants

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

func NewFactory Uses

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

NewFactory creates a new PluginFactory.

func Register Uses

func Register(plugins *admission.Plugins)

Register registers a plugin.

type Handler Uses

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

Handler contains gardenlisters and and admission handler.

func New Uses

func New() (*Handler, error)

New creates a new Handler admission plugin.

func (*Handler) Admit Uses

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 Uses

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

AssignReadyFunc assigns the ready function to the admission handler.

func (*Handler) SetInternalCoreInformerFactory Uses

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

SetInternalCoreInformerFactory gets the garden core informer factory and adds it.

func (*Handler) Validate Uses

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 Uses

func (a *Handler) ValidateInitialization() error

ValidateInitialization checks whether the plugin was correctly initialized.

Package plant imports 14 packages (graph). Updated 2020-08-13. Refresh now. Tools for package owners.