admission

package
v0.0.0-...-52cd4e6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package admission provide client for kubernetes admission operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provides a wrapper for kubernetes admission interface.

func (*Client) CreateValidatingWebhookCfg

func (c *Client) CreateValidatingWebhookCfg(cfg *v1.ValidatingWebhookConfiguration) (
	*v1.ValidatingWebhookConfiguration, error)

CreateValidatingWebhookCfg creates given ValidatingWebhookConfiguration

func (*Client) DeleteValidatingWebhookCfg

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

DeleteValidatingWebhookCfg deletes given ValidatingWebhookConfiguration

func (*Client) GetValidatingWebhookCfg

func (c *Client) GetValidatingWebhookCfg(webhookName string) (
	*v1.ValidatingWebhookConfiguration, error)

GetValidatingWebhookCfg get WebhookConfiguration by name

func (*Client) UpdateValidatingWebhookCfg

func (c *Client) UpdateValidatingWebhookCfg(cfg *v1.ValidatingWebhookConfiguration) (
	*v1.ValidatingWebhookConfiguration, error)

UpdateValidatingWebhookCfg updates given ValidatingWebhookConfiguration

type Ops

type Ops interface {
	ValidatingWebhookCfgOps
}

Ops is an interface to the admission client wrapper.

func Instance

func Instance() Ops

Instance returns a singleton instance of the client.

type ValidatingWebhookCfgOps

type ValidatingWebhookCfgOps interface {
	// CreateValidatingWebhookCfg creates given ValidatingWebhookConfiguration
	CreateValidatingWebhookCfg(req *v1.ValidatingWebhookConfiguration) (
		*v1.ValidatingWebhookConfiguration, error)
	// UpdateValidatingWebhookCfg updates given ValidatingWebhookConfiguration
	UpdateValidatingWebhookCfg(req *v1.ValidatingWebhookConfiguration) (
		*v1.ValidatingWebhookConfiguration, error)
	// DeleteValidatingWebhookCfg deletes given ValidatingWebhookConfiguration
	DeleteValidatingWebhookCfg(name string) error
	// GetValidatingWebhookCfg get WebhookConfiguration by name
	GetValidatingWebhookCfg(name string) (*v1.ValidatingWebhookConfiguration, error)
}

ValidatingWebhookCfgOps is interface to perform CRUD ops on validating webhook controller

Jump to

Keyboard shortcuts

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