webhook

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VMByName                = "harvesterhci.io/vm-by-name"
	PCIDeviceByResourceName = "harvesterhcio.io/pcidevice-by-resource-name"
)
View Source
const (
	VMLabel = "harvesterhci.io/vmName"
)

Variables

View Source
var (
	MutatorName = "pcidevices-mutator"
)

Functions

func Mutation

func Mutation(clients *Clients) (http.Handler, []types.Resource, error)

func NewPodMutator

func NewPodMutator(deviceCache v1beta1.PCIDeviceCache, kubevirtCache kubevirtctl.VirtualMachineCache) types.Mutator

func RegisterIndexers

func RegisterIndexers(clients *Clients)

Types

type AdmissionWebhookServer

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

AdmissionWebhookServer serves the mutating webhook for pcidevices

func New

func New(ctx context.Context, restConfig *rest.Config) *AdmissionWebhookServer

New helps initialise a new AdmissionWebhookServer

func (*AdmissionWebhookServer) ListenAndServe

func (s *AdmissionWebhookServer) ListenAndServe() error

ListenAndServe starts the http listener and handlers

type Clients

type Clients struct {
	clients.Clients
	CoreFactory      *ctlcore.Factory
	HarvesterFactory *ctlharvesterv1.Factory
	KubevirtFactory  *ctlkubevirtv1.Factory
	PCIFactory       *ctlpcidevices.Factory
}

func NewClient

func NewClient(ctx context.Context, rest *rest.Config, threadiness int) (*Clients, error)

Jump to

Keyboard shortcuts

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