Back to / plugin / pkg / global / customverbauthorizer

Package customverbauthorizer

Latest Go to latest
Published: Jul 9, 2020 | Licenses: Apache-2.0 , BSD-2-Clause , MIT , MPL-2.0 | Module:


Package Files


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

	// CustomVerbModifyProjectTolerationsWhitelist is a constant for the custom verb that allows modifying the
	// `.spec.tolerations.whitelist` field in `Project` resources.
	CustomVerbModifyProjectTolerationsWhitelist = "modify-spec-tolerations-whitelist"

func NewFactory

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

NewFactory creates a new PluginFactory.

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin.

type CustomVerbAuthorizer

type CustomVerbAuthorizer struct {
	// contains filtered or unexported fields

CustomVerbAuthorizer contains an admission handler and listers.

func New

func New() (*CustomVerbAuthorizer, error)

New creates a new CustomVerbAuthorizer admission plugin.

func (*CustomVerbAuthorizer) SetAuthorizer

func (c *CustomVerbAuthorizer) SetAuthorizer(authorizer authorizer.Authorizer)

SetAuthorizer gets the authorizer.

func (*CustomVerbAuthorizer) Validate

func (c *CustomVerbAuthorizer) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error

Validate makes admissions decisions based on custom verbs.

func (*CustomVerbAuthorizer) ValidateInitialization

func (c *CustomVerbAuthorizer) ValidateInitialization() error

ValidateInitialization checks whether the plugin was correctly initialized.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier