shadowpod

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package shadowpod contains the validating webhook logic and the cache of peering information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Description

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

Description is a struct that contains the main informations about a shadow pod.

type Validator

type Validator struct {
	PeeringCache *peeringCache
	// contains filtered or unexported fields
}

Validator is the handler used by the Validating Webhook to validate shadow pods.

func NewValidator

func NewValidator(c client.Client, enableResourceValidation bool) *Validator

NewValidator creates a new shadow pod validator.

func (*Validator) CacheRefresher

func (spv *Validator) CacheRefresher(interval time.Duration) func(ctx context.Context) error

CacheRefresher is a wrapper function that receives a ShadowPodValidator and starts a PollImmediateInfinite timer to periodically refresh the cache.

func (*Validator) DecodeShadowPod

func (spv *Validator) DecodeShadowPod(obj runtime.RawExtension) (shadowpod *vkv1alpha1.ShadowPod, err error)

DecodeShadowPod decodes a shadow pod from a given runtime object.

func (*Validator) Handle

Handle is the function in charge of handling the webhook validation request about the creation, update and deletion of shadowpods.

func (*Validator) HandleCreate

func (spv *Validator) HandleCreate(ctx context.Context, req *admission.Request) admission.Response

HandleCreate is the function in charge of handling Creation requests.

func (*Validator) HandleDelete

func (spv *Validator) HandleDelete(ctx context.Context, req *admission.Request) admission.Response

HandleDelete is the function in charge of handling Deletion requests.

func (*Validator) HandleUpdate

func (spv *Validator) HandleUpdate(ctx context.Context, req *admission.Request) admission.Response

HandleUpdate is the function in charge of handling Update requests.

Jump to

Keyboard shortcuts

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