webhook

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Mutating is a list of MutatingWebhook to be registered. Append to this slice to register more webhooks

Validating is a list of ValidatingWebhook to be registered. Append to this slice to register more webhooks

Functions

func New

func New(globalCfg *globalCfg.Config) (*config, error)

New returns a new webhook config

func SarAuthenticateNginxIngressController added in v0.1.2

func SarAuthenticateNginxIngressController(ctx context.Context, lgr logr.Logger, cl client.Client, req admission.Request) (string, error)

SarAuthenticateNginxIngressController checks if the user is allowed to perform a request against an NginxIngressController resource. If the user is allowed it returns an empty string, otherwise it returns the reason why they're not allowed.

Types

type Webhook

type Webhook[T webhookType] struct {
	AddToManager func(manager.Manager) error
	Definition   func(c *config) (T, error)
}

Webhook defines a webhook that can be registered and added to the manager

Jump to

Keyboard shortcuts

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