webhooks

package
v0.0.0-...-7b34d14 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 27 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_resources.Converter) *admission.Webhook

func PodMutatingWebhook

func PodMutatingWebhook(mutator PodMutator) *kube_admission.Webhook

Types

type AdmissionValidator

type AdmissionValidator interface {
	admission.DecoderInjector
	webhook.AdmissionHandler
	Supports(admission.Request) bool
}

func NewMeshValidatorWebhook

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

func NewValidatingWebhook

func NewValidatingWebhook(converter k8s_resources.Converter, coreRegistry core_registry.TypeRegistry, k8sRegistry k8s_registry.TypeRegistry) AdmissionValidator

type CompositeValidator

type CompositeValidator struct {
	Validators []AdmissionValidator
}

func (*CompositeValidator) AddValidator

func (c *CompositeValidator) AddValidator(validator AdmissionValidator)

func (*CompositeValidator) Handle

func (*CompositeValidator) InjectDecoder

func (c *CompositeValidator) InjectDecoder(d *admission.Decoder) error

func (*CompositeValidator) WebHook

func (c *CompositeValidator) WebHook() *admission.Webhook

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
	Converter    k8s_resources.Converter
	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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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