webhooks

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 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(scheme *runtime.Scheme, converter k8s_common.Converter) *admission.Webhook

func NewContainerPatchValidatorWebhook

func NewContainerPatchValidatorWebhook() k8s_common.AdmissionValidator

func NewValidatingWebhook

func NewValidatingWebhook(
	converter k8s_common.Converter,
	coreRegistry core_registry.TypeRegistry,
	k8sRegistry k8s_registry.TypeRegistry,
	mode core.CpMode,
	federatedZone bool,
	disableOriginLabelValidation bool,
) 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

type ContainerPatchValidator struct {
	SystemNamespace string
}

func (*ContainerPatchValidator) Handle

func (*ContainerPatchValidator) InjectDecoder

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

func (*ContainerPatchValidator) Supports

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

type Defaulter

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

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

type PodMutator

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

type PolicyNamespaceValidator

type PolicyNamespaceValidator struct {
	Decoder         *admission.Decoder
	SystemNamespace string
}

func (*PolicyNamespaceValidator) Handle

func (*PolicyNamespaceValidator) InjectDecoder

func (p *PolicyNamespaceValidator) InjectDecoder(decoder *admission.Decoder)

func (*PolicyNamespaceValidator) Supports

func (p *PolicyNamespaceValidator) Supports(request admission.Request) bool

type ServiceValidator

type ServiceValidator struct {
	Decoder *admission.Decoder
}

ServiceValidator validates Dubbo-specific annotations on Services.

func (*ServiceValidator) Handle

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

type ZoneValidator

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

func (*ZoneValidator) Handle

func (*ZoneValidator) InjectDecoder

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

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

Jump to

Keyboard shortcuts

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