proxy_syncer

package
v1.18.0-beta31 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupCollectionDynamic

func SetupCollectionDynamic[T any](
	ctx context.Context,
	client kube.Client,
	gvr schema.GroupVersionResource,
	opts ...krt.CollectionOption,
) krt.Collection[*T]

SetupCollectionDynamic uses the dynamic client to setup an informer for a resource and then uses an intermediate krt collection to type the unstructured resource. This is a temporary workaround until we update to the latest istio version and can uncomment the code below for registering types. HACK: we don't want to use this long term, but it's letting me push forward with deveopment

func TransformUpstreamsBuilder

func TransformUpstreamsBuilder(ctx context.Context, inputs EndpointsInputs) func(kctx krt.HandlerContext, us UpstreamWrapper) *EndpointsForUpstream

Types

type EndpointMetadata

type EndpointMetadata struct {
	Labels map[string]string
}

type EndpointResources

type EndpointResources struct {
	Endpoints        envoycache.Resource
	EndpointsVersion uint64
	UpstreamRef      types.NamespacedName
}

func TransformEndpointToResources

func TransformEndpointToResources(ep EndpointsForUpstream) *EndpointResources

func (EndpointResources) Equals

func (EndpointResources) ResourceName

func (c EndpointResources) ResourceName() string

type EndpointWithMd

type EndpointWithMd struct {
	*envoy_config_endpoint_v3.LbEndpoint
	EndpointMd EndpointMetadata
}

type EndpointsForUpstream

type EndpointsForUpstream struct {
	LbEps map[krtcollections.PodLocality][]EndpointWithMd

	UpstreamRef types.NamespacedName
	// contains filtered or unexported fields
}

func NewEndpointsForUpstream

func NewEndpointsForUpstream(us UpstreamWrapper, logger *zap.Logger) *EndpointsForUpstream

func (*EndpointsForUpstream) Add

func (EndpointsForUpstream) Equals

func (EndpointsForUpstream) ResourceName

func (c EndpointsForUpstream) ResourceName() string

type EndpointsInputs

type EndpointsInputs struct {
	Upstreams         krt.Collection[UpstreamWrapper]
	Endpoints         krt.Collection[*corev1.Endpoints]
	Pods              krt.Collection[krtcollections.LocalityPod]
	EndpointsSettings krt.Singleton[EndpointsSettings]
	Services          krt.Collection[*corev1.Service]
}

func NewGlooK8sEndpointInputs

func NewGlooK8sEndpointInputs(settings krt.Singleton[glookubev1.Settings], istioClient kube.Client, pods krt.Collection[krtcollections.LocalityPod], services krt.Collection[*corev1.Service], finalUpstreams krt.Collection[UpstreamWrapper]) EndpointsInputs

type EndpointsSettings

type EndpointsSettings struct {
	EnableAutoMtls bool
}

func (EndpointsSettings) Equals

func (EndpointsSettings) ResourceName

func (p EndpointsSettings) ResourceName() string

type GatewayInputChannels

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

func NewGatewayInputChannels

func NewGatewayInputChannels() *GatewayInputChannels

func (*GatewayInputChannels) Kick

func (x *GatewayInputChannels) Kick(ctx context.Context)

type ProxySyncer

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

ProxySyncer is responsible for translating Kubernetes Gateway CRs into Gloo Proxies and syncing the proxyClient with the newly translated proxies.

func NewProxySyncer

func NewProxySyncer(
	ctx context.Context,
	settings krt.Singleton[glookubev1.Settings],
	controllerName string,
	writeNamespace string,
	inputs *GatewayInputChannels,
	mgr manager.Manager,
	client kube.Client,
	pods krt.Collection[krtcollections.LocalityPod],
	k8sGwExtensions extensions.K8sGatewayExtensions,
	translator setup.TranslatorFactory,
	xdsCache envoycache.SnapshotCache,
	syncerExtensions []syncer.TranslatorSyncerExtension,
	glooReporter reporter.StatusReporter,
	proxyReconcileQueue ggv2utils.AsyncQueue[gloov1.ProxyList],
) *ProxySyncer

NewProxySyncer returns an implementation of the ProxySyncer The provided GatewayInputChannels are used to trigger syncs.

func (*ProxySyncer) Init

func (s *ProxySyncer) Init(ctx context.Context) error

func (*ProxySyncer) Start

func (s *ProxySyncer) Start(ctx context.Context) error

type ProxyTranslator

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

func NewProxyTranslator

func NewProxyTranslator(translator setup.TranslatorFactory,
	xdsCache envoycache.SnapshotCache,
	settings krt.Singleton[glookubev1.Settings],
	syncerExtensions []syncer.TranslatorSyncerExtension,
	glooReporter reporter.StatusReporter,
) ProxyTranslator

type SecretInputs

type SecretInputs struct {
	Secrets v1.SecretList
}

type UpstreamWrapper

type UpstreamWrapper = krtcollections.ResourceWrapper[*gloov1.Upstream]

UpstreamWrapper provides a keying function for Gloo's `v1.Upstream`

Jump to

Keyboard shortcuts

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