webhooks

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultingWebhookFor

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

func NewMeshValidatorWebhook

func NewMeshValidatorWebhook(validator managers_mesh.MeshValidator, converter k8s_common.Converter, resourceManager manager.ResourceManager) k8s_common.AdmissionValidator

func NewValidatingWebhook

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

func NewZoneValidatorWebhook

func NewZoneValidatorWebhook(validator zone.Validator) k8s_common.AdmissionValidator

func PodMutatingWebhook

func PodMutatingWebhook(mutator PodMutator) *kube_admission.Webhook

Types

type Defaulter

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

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(*kube_core.Pod) error

type SecretValidator

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

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