admissionregistration

package
v1.20.4-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetInstance

func SetInstance(i Ops)

SetInstance replaces the instance with the provided one. Should be used only for testing purposes.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a wrapper for kubernetes admission interface.

func New

New builds a new admissionregistration client.

func NewForConfig

func NewForConfig(c *rest.Config) (*Client, error)

NewForConfig builds a new admissionregistration client for the given config.

func (*Client) CreateMutatingWebhookConfiguration

func (c *Client) CreateMutatingWebhookConfiguration(cfg *hook.MutatingWebhookConfiguration) (*hook.MutatingWebhookConfiguration, error)

CreateMutatingWebhookConfiguration creates given MutatingWebhookConfiguration

func (*Client) DeleteMutatingWebhookConfiguration

func (c *Client) DeleteMutatingWebhookConfiguration(name string) error

DeleteMutatingWebhookConfiguration deletes given MutatingWebhookConfiguration

func (*Client) GetMutatingWebhookConfiguration

func (c *Client) GetMutatingWebhookConfiguration(name string) (*hook.MutatingWebhookConfiguration, error)

GetMutatingWebhookConfiguration returns a given MutatingWebhookConfiguration

func (*Client) SetConfig

func (c *Client) SetConfig(cfg *rest.Config)

SetConfig sets the config and resets the client.

func (*Client) UpdateMutatingWebhookConfiguration

func (c *Client) UpdateMutatingWebhookConfiguration(cfg *hook.MutatingWebhookConfiguration) (*hook.MutatingWebhookConfiguration, error)

UpdateMutatingWebhookConfiguration updates given MutatingWebhookConfiguration

type MutatingWebhookConfigurationOps

type MutatingWebhookConfigurationOps interface {
	// GetMutatingWebhookConfiguration returns a given MutatingWebhookConfiguration
	GetMutatingWebhookConfiguration(name string) (*hook.MutatingWebhookConfiguration, error)
	// CreateMutatingWebhookConfiguration creates given MutatingWebhookConfiguration
	CreateMutatingWebhookConfiguration(req *hook.MutatingWebhookConfiguration) (*hook.MutatingWebhookConfiguration, error)
	// UpdateMutatingWebhookConfiguration updates given MutatingWebhookConfiguration
	UpdateMutatingWebhookConfiguration(*hook.MutatingWebhookConfiguration) (*hook.MutatingWebhookConfiguration, error)
	// DeleteMutatingWebhookConfiguration deletes given MutatingWebhookConfiguration
	DeleteMutatingWebhookConfiguration(name string) error
}

MutatingWebhookConfigurationOps is interface to perform CRUD ops on mutatting webhook controller

type Ops

type Ops interface {
	MutatingWebhookConfigurationOps

	// SetConfig sets the config and resets the client.
	SetConfig(config *rest.Config)
}

Ops is an interface to the admission client wrapper.

func Instance

func Instance() Ops

Instance returns a singleton instance of the client.

func NewInstanceFromConfigFile

func NewInstanceFromConfigFile(config string) (Ops, error)

NewInstanceFromConfigFile returns new instance of client by using given config file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL