webhooks

package
v1.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GatewayAPINotSupportedErr = errors.New("GatewayAPI of Kuma is only supported in Standalone deployments")

Functions

func DefaultingWebhookFor

func DefaultingWebhookFor(factory func() core_model.Resource, converter k8s_common.Converter) *admission.Webhook

func NewContainerPatchValidatorWebhook added in v1.8.1

func NewContainerPatchValidatorWebhook() k8s_common.AdmissionValidator

func NewDataplaneValidatorWebhook added in v1.8.1

func NewDataplaneValidatorWebhook(validator dataplane.Validator, converter k8s_common.Converter, resourceManager manager.ResourceManager) k8s_common.AdmissionValidator

func NewExternalServiceValidatorWebhook added in v1.8.1

func NewExternalServiceValidatorWebhook(validator externalservice_managers.ExternalServiceValidator, converter k8s_common.Converter) k8s_common.AdmissionValidator

func NewGatewayAPIMultizoneValidator added in v1.8.1

func NewGatewayAPIMultizoneValidator(cpMode config_core.CpMode) *kube_admission.Webhook

func NewGatewayInstanceValidatorWebhook added in v1.8.1

func NewGatewayInstanceValidatorWebhook(converter k8s_common.Converter, resourceManager manager.ResourceManager) k8s_common.AdmissionValidator

func NewMeshValidatorWebhook

func NewMeshValidatorWebhook(
	validator managers_mesh.MeshValidator,
	converter k8s_common.Converter,
	unsafeDelete bool,
) k8s_common.AdmissionValidator

func NewRateLimitValidatorWebhook added in v1.8.1

func NewRateLimitValidatorWebhook(validator ratelimit_managers.RateLimitValidator, converter k8s_common.Converter) k8s_common.AdmissionValidator

func NewValidatingWebhook

func NewValidatingWebhook(converter k8s_common.Converter, coreRegistry core_registry.TypeRegistry, k8sRegistry k8s_registry.TypeRegistry, mode core.CpMode, cpServiceAccountName string) k8s_common.AdmissionValidator

func NewZoneValidatorWebhook

func NewZoneValidatorWebhook(validator zone.Validator, unsafeDelete bool) k8s_common.AdmissionValidator

func PodMutatingWebhook

func PodMutatingWebhook(mutator PodMutator) *kube_admission.Webhook

Types

type ContainerPatchValidator added in v1.8.1

type ContainerPatchValidator struct {
	SystemNamespace string
}

func (*ContainerPatchValidator) Handle added in v1.8.1

func (*ContainerPatchValidator) InjectDecoder added in v1.8.1

func (h *ContainerPatchValidator) InjectDecoder(d *admission.Decoder) error

func (*ContainerPatchValidator) Supports added in v1.8.1

func (h *ContainerPatchValidator) Supports(req admission.Request) bool

type DataplaneValidator added in v1.8.1

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

func (*DataplaneValidator) Handle added in v1.8.1

func (*DataplaneValidator) InjectDecoder added in v1.8.1

func (h *DataplaneValidator) InjectDecoder(d *admission.Decoder) error

func (*DataplaneValidator) Supports added in v1.8.1

func (h *DataplaneValidator) Supports(req admission.Request) bool

func (*DataplaneValidator) ValidateCreate added in v1.8.1

func (*DataplaneValidator) ValidateUpdate added in v1.8.1

type Defaulter

type Defaulter interface {
	core_model.Resource
	Default() error
}

type ExternalServiceValidator added in v1.8.1

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

func (*ExternalServiceValidator) Handle added in v1.8.1

func (*ExternalServiceValidator) InjectDecoder added in v1.8.1

func (h *ExternalServiceValidator) InjectDecoder(d *admission.Decoder) error

func (*ExternalServiceValidator) Supports added in v1.8.1

func (*ExternalServiceValidator) ValidateCreate added in v1.8.1

func (*ExternalServiceValidator) ValidateDelete added in v1.8.1

func (*ExternalServiceValidator) ValidateUpdate added in v1.8.1

type GatewayAPIMultizoneValidator added in v1.8.1

type GatewayAPIMultizoneValidator struct {
	CpMode  config_core.CpMode
	Decoder *kube_admission.Decoder
}

func (*GatewayAPIMultizoneValidator) Handle added in v1.8.1

func (*GatewayAPIMultizoneValidator) InjectDecoder added in v1.8.1

type GatewayInstanceValidator added in v1.8.1

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

func (*GatewayInstanceValidator) Handle added in v1.8.1

func (*GatewayInstanceValidator) InjectDecoder added in v1.8.1

func (h *GatewayInstanceValidator) InjectDecoder(d *admission.Decoder) error

func (*GatewayInstanceValidator) Supports added in v1.8.1

func (*GatewayInstanceValidator) ValidateCreate added in v1.8.1

func (*GatewayInstanceValidator) ValidateDelete added in v1.8.1

func (*GatewayInstanceValidator) ValidateUpdate added in v1.8.1

type MeshValidator

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

func (*MeshValidator) Handle

func (*MeshValidator) InjectDecoder

func (h *MeshValidator) InjectDecoder(d *admission.Decoder) error

func (*MeshValidator) Supports

func (h *MeshValidator) Supports(req admission.Request) bool

func (*MeshValidator) ValidateCreate

func (h *MeshValidator) ValidateCreate(ctx context.Context, req admission.Request) admission.Response

func (*MeshValidator) ValidateDelete

func (h *MeshValidator) ValidateDelete(ctx context.Context, req admission.Request) admission.Response

func (*MeshValidator) ValidateUpdate

func (h *MeshValidator) ValidateUpdate(ctx context.Context, req admission.Request) admission.Response

type OwnerReferenceMutator

type OwnerReferenceMutator struct {
	Client       kube_client.Client
	CoreRegistry core_registry.TypeRegistry
	K8sRegistry  k8s_registry.TypeRegistry
	Decoder      *admission.Decoder
	Scheme       *kube_runtime.Scheme
}

func (*OwnerReferenceMutator) Handle

func (*OwnerReferenceMutator) InjectDecoder

func (m *OwnerReferenceMutator) InjectDecoder(d *admission.Decoder) error

type PodMutator

type PodMutator func(context.Context, *kube_core.Pod) error

type RateLimitValidator added in v1.8.1

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

func (*RateLimitValidator) Handle added in v1.8.1

func (*RateLimitValidator) InjectDecoder added in v1.8.1

func (h *RateLimitValidator) InjectDecoder(d *admission.Decoder) error

func (*RateLimitValidator) Supports added in v1.8.1

func (h *RateLimitValidator) Supports(req admission.Request) bool

func (*RateLimitValidator) ValidateCreate added in v1.8.1

func (*RateLimitValidator) ValidateDelete added in v1.8.1

func (*RateLimitValidator) ValidateUpdate added in v1.8.1

type SecretValidator

type SecretValidator struct {
	Decoder      *admission.Decoder
	Client       kube_client.Reader
	Validator    secret_manager.SecretValidator
	UnsafeDelete bool
}

func (*SecretValidator) Handle

func (*SecretValidator) InjectDecoder

func (v *SecretValidator) InjectDecoder(d *admission.Decoder) error

type ServiceValidator

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

ServiceValidator validates Kuma-specific annotations on Services.

func (*ServiceValidator) Handle

Handle admits a Service only if Kuma-specific annotations have proper values.

func (*ServiceValidator) InjectDecoder

func (v *ServiceValidator) InjectDecoder(d *admission.Decoder) error

type ZoneValidator

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

func (*ZoneValidator) Handle

func (*ZoneValidator) InjectDecoder

func (z *ZoneValidator) InjectDecoder(_ *admission.Decoder) error

func (*ZoneValidator) Supports

func (z *ZoneValidator) Supports(req admission.Request) bool

func (*ZoneValidator) ValidateDelete

func (z *ZoneValidator) ValidateDelete(ctx context.Context, req admission.Request) admission.Response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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