webhook

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0, BSD-2-Clause, MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const WebhookPath = "/webhook"

WebhookPath is the path under which the webhook will be registered.

Variables

This section is empty.

Functions

This section is empty.

Types

type Webhook

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

Webhook is the implementation for all the webhooks required for kupid.

func NewDefaultWebhook

func NewDefaultWebhook() (*Webhook, error)

NewDefaultWebhook creates a Webhook instance with the default eet of processor factories registered.

func NewWebhook

func NewWebhook() *Webhook

NewWebhook creates a bare Webhook instance.

func NewWebhookWithProcessorFactories

func NewWebhookWithProcessorFactories(pfs []processorFactory) (*Webhook, error)

NewWebhookWithProcessorFactories creates a Webhook instance with the supplied processor factories registered.

func (*Webhook) Handle

Handle handles admission requests.

func (*Webhook) InjectAPIReader added in v0.1.2

func (w *Webhook) InjectAPIReader(r client.Reader) error

InjectAPIReader injects a direct client.Reader into the webhook.

func (*Webhook) InjectCache

func (w *Webhook) InjectCache(c cache.Cache) error

InjectCache injects a cache into the webhook.

func (*Webhook) InjectDecoder

func (w *Webhook) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder into a webhook.

func (*Webhook) SetupWithManager

func (w *Webhook) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the webhook to inject applicable podschedulingpolicies and clusterpodschedulingpolicies.

func (*Webhook) Start

func (w *Webhook) Start(stop <-chan struct{}) error

Start initializes the cache. The component will stop running when the channel is closed. Start blocks until the channel is closed or an error occurs.

Jump to

Keyboard shortcuts

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