webhook

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WebhookName is the name of the webhook acl ACL extension.
	WebhookName = "acl-webhook"
	// WebhookPath is the path where the webhook listen to.
	WebhookPath = "/mutate"
)
View Source
const (
	// ShootFilterPrefix is prefix from shoot technicalID
	ShootFilterPrefix = "shoot--"
	// ExtensionName contains the ACl extension name.
	ExtensionName = "acl"
)

Variables

View Source
var (

	// DefaultAddOptions are the default AddOptions for AddToManager.
	DefaultAddOptions = AddOptions{}
)

Functions

func AddToManager added in v1.0.0

func AddToManager(mgr manager.Manager) (*extensionswebhook.Webhook, error)

AddToManager creates a webhook with the default options and adds it to the manager.

func AddToManagerWithOptions added in v1.0.0

func AddToManagerWithOptions(
	mgr manager.Manager,
	options AddOptions,
) error

AddToManagerWithOptions creates a webhook with the given options and adds it to the manager.

Types

type AddOptions added in v1.0.0

type AddOptions struct {
	AllowedCIDRs []string
}

AddOptions are options to apply when adding the webhook to the manager.

type EnvoyFilterWebhook

type EnvoyFilterWebhook struct {
	Client                 client.Client
	Decoder                *admission.Decoder
	AdditionalAllowedCIDRs []string
}

EnvoyFilterWebhook is a service struct that defines functions to handle admission requests for EnvoyFilters.

func (*EnvoyFilterWebhook) Handle

Handle receives incoming admission requests for EnvoyFilters and returns a response. The response contains patches for specific EnvoyFilters, which need to be patched for the ACL extension to be able to control all filter chains.

Jump to

Keyboard shortcuts

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