webhook

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

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

Functions

func Mutation

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

func NewPCIDeviceClaimValidator added in v0.2.5

func NewPCIDeviceClaimValidator(deviceCache v1beta1.PCIDeviceCache, kubevirtCache kubevirtctl.VirtualMachineCache) types.Validator

func NewPCIVMMutator added in v0.2.4

func NewPCIVMMutator(deviceCache v1beta1.PCIDeviceCache, pciClaimCache v1beta1.PCIDeviceClaimCache, pciClaimClient v1beta1.PCIDeviceClaimClient) types.Mutator

func NewPodMutator

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

func NewSriovNetworkDeviceValidator added in v0.2.5

func NewSriovNetworkDeviceValidator(claimCache v1beta1.PCIDeviceClaimCache) types.Validator

func RegisterIndexers

func RegisterIndexers(clients *Clients)

func Validation added in v0.2.5

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

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