admission

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNSET triState = iota - 1
	FALSE
	TRUE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionController

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

func InitAdmissionController

func InitAdmissionController(conf *conf.AdmissionControllerConf, pcCache *PriorityClassCache, nsCache *NamespaceCache) *AdmissionController

func (*AdmissionController) Health

func (*AdmissionController) Serve

type Informers

type Informers struct {
	ConfigMap     informersv1.ConfigMapInformer
	PriorityClass schedulinginformersv1.PriorityClassInformer
	Namespace     informersv1.NamespaceInformer
	// contains filtered or unexported fields
}

func NewInformers

func NewInformers(kubeClient client.KubeClient, namespace string) *Informers

func (*Informers) Start

func (i *Informers) Start()

func (*Informers) Stop

func (i *Informers) Stop()

type NamespaceCache added in v1.3.0

type NamespaceCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewNamespaceCache added in v1.3.0

func NewNamespaceCache(namespaces informersv1.NamespaceInformer) *NamespaceCache

NewNamespaceCache creates a new cache and registers the handler for the cache with the Informer.

type PriorityClassCache

type PriorityClassCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewPriorityClassCache

func NewPriorityClassCache(priorityClasses informersv1.PriorityClassInformer) *PriorityClassCache

NewPriorityClassCache creates a new cache and registers the handler for the cache with the Informer.

type ValidateConfResponse

type ValidateConfResponse struct {
	Allowed bool   `json:"allowed"`
	Reason  string `json:"reason"`
}

type WebhookManager

type WebhookManager interface {
	// LoadCACertificates is used to load CA certs from K8s secrets and update if needed
	LoadCACertificates() error

	// InstallWebhooks is used to install or update webhooks
	InstallWebhooks() error

	// GenerateServerCertificate is used to generate a server certificate chain
	GenerateServerCertificate() (*tls.Certificate, error)

	// WaitForCertificateExpiration blocks until certificates need to be renewed
	WaitForCertificateExpiration()
}

WebhookManager is used to handle all registration requirements for the webhook, including certificates

func NewWebhookManager

func NewWebhookManager(conf *conf.AdmissionControllerConf) (WebhookManager, error)

NewWebhookManager is used to create a new webhook manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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