peerproxy

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 38 Imported by: 4

Documentation

Index

Constants

View Source
const (
	PeerProxiedHeader = "x-kubernetes-peer-proxied"
)

Variables

This section is empty.

Functions

func NewPeerProxyHandler

func NewPeerProxyHandler(
	serverId string,
	identityLeaseLabelSelector string,
	leaseInformer coordinationv1informers.LeaseInformer,
	reconciler reconcilers.PeerEndpointLeaseReconciler,
	ser runtime.NegotiatedSerializer,
	loopbackClientConfig *rest.Config,
	proxyClientConfig *transport.Config,
) (*peerProxyHandler, error)

New creates a new instance to implement unknown version proxy This method is used for an alpha feature UnknownVersionInteroperabilityProxy and is subject to future modifications.

Types

type GVExtractor added in v0.35.0

type GVExtractor func(obj interface{}) []schema.GroupVersion

GVExtractor is a function that extracts group-versions from an object. It returns a slice of GroupVersions belonging to CRDs or aggregated APIs that should be excluded from peer-discovery to avoid advertising stale CRDs/aggregated APIs in peer-aggregated discovery that were deleted but still appear in a peer's discovery.

type Interface

type Interface interface {
	WrapHandler(handler http.Handler) http.Handler
	WaitForCacheSync(stopCh <-chan struct{}) error
	HasFinishedSync() bool
	RunLocalDiscoveryCacheSync(stopCh <-chan struct{}) error
	RunPeerDiscoveryCacheSync(ctx context.Context, workers int)
	RunExcludedGVsReaper(stopCh <-chan struct{})
	RunGVDeletionWorkers(ctx context.Context, workers int)
	GetPeerResources() map[string][]apidiscoveryv2.APIGroupDiscovery
	RegisterCacheInvalidationCallback(cb func())
	RegisterCRDInformerHandlers(crdInformer cache.SharedIndexInformer, extractor GVExtractor) error
	RegisterAPIServiceInformerHandlers(apiServiceInformer cache.SharedIndexInformer, extractor GVExtractor) error
}

Interface defines how the Mixed Version Proxy filter interacts with the underlying system.

type PeerDiscoveryCacheEntry added in v0.35.0

type PeerDiscoveryCacheEntry struct {
	GVRs           map[schema.GroupVersionResource]bool
	GroupDiscovery []apidiscoveryv2.APIGroupDiscovery
}

PeerDiscoveryCacheEntry holds the GVRs and group-level discovery info for a peer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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