Documentation ¶
Index ¶
- func ApplyDestRulesForUpstream(destrule *DestinationRuleWrapper, u *gloov1.Upstream) (*gloov1.Upstream, string)
- func LbPriority(proxyLocality, endpointsLocality *envoy_config_core_v3.Locality) int
- func NewGlooK8sEndpoints(ctx context.Context, inputs EndpointsInputs) krt.Collection[EndpointsForUpstream]
- func SetupCollectionDynamic[T any](ctx context.Context, client kube.Client, gvr schema.GroupVersionResource, ...) krt.Collection[*T]
- func TransformUpstreamsBuilder(ctx context.Context, inputs EndpointsInputs) func(kctx krt.HandlerContext, us UpstreamWrapper) *EndpointsForUpstream
- type DestinationRuleIndex
- type DestinationRuleWrapper
- type EndpointMetadata
- type EndpointResources
- type EndpointWithMd
- type EndpointsForUpstream
- type EndpointsInputs
- type EndpointsSettings
- type GatewayInputChannels
- type LoadBalancingInfo
- type NsWithHostname
- type PerClientEnvoyClusters
- type PerClientEnvoyEndpoints
- type Prioritizer
- type PriorityInfo
- type ProxySyncer
- type ProxyTranslator
- type SecretInputs
- type UccWithEndpoints
- type UpstreamWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDestRulesForUpstream ¶ added in v1.18.0
func LbPriority ¶ added in v1.18.0
func LbPriority(proxyLocality, endpointsLocality *envoy_config_core_v3.Locality) int
func NewGlooK8sEndpoints ¶
func NewGlooK8sEndpoints(ctx context.Context, inputs EndpointsInputs) krt.Collection[EndpointsForUpstream]
func SetupCollectionDynamic ¶ added in v1.18.0
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 DestinationRuleIndex ¶ added in v1.18.0
type DestinationRuleIndex struct { Destrules krt.Collection[DestinationRuleWrapper] ByHostname krt.Index[NsWithHostname, DestinationRuleWrapper] }
func NewDestRuleIndex ¶ added in v1.18.0
func NewDestRuleIndex(istioClient kube.Client) DestinationRuleIndex
func NewEmptyDestRuleIndex ¶ added in v1.18.0
func NewEmptyDestRuleIndex() DestinationRuleIndex
func (*DestinationRuleIndex) FetchDestRulesFor ¶ added in v1.18.0
func (d *DestinationRuleIndex) FetchDestRulesFor(kctx krt.HandlerContext, proxyNs string, hostname string, podLabels map[string]string) *DestinationRuleWrapper
type DestinationRuleWrapper ¶ added in v1.18.0
type DestinationRuleWrapper struct {
*networkingclient.DestinationRule
}
func (DestinationRuleWrapper) Equals ¶ added in v1.18.0
func (c DestinationRuleWrapper) Equals(k DestinationRuleWrapper) bool
func (DestinationRuleWrapper) GetLabelSelector ¶ added in v1.18.0
func (s DestinationRuleWrapper) GetLabelSelector() map[string]string
important for FilterSelects below
func (DestinationRuleWrapper) ResourceName ¶ added in v1.18.0
func (c DestinationRuleWrapper) ResourceName() string
type EndpointMetadata ¶
type EndpointResources ¶ added in v1.18.0
type EndpointResources struct { Endpoints envoycache.Resource EndpointsVersion uint64 UpstreamRef types.NamespacedName }
func TransformEndpointToResources ¶ added in v1.18.0
func TransformEndpointToResources(ep EndpointsForUpstream) *EndpointResources
func (EndpointResources) Equals ¶ added in v1.18.0
func (c EndpointResources) Equals(in EndpointResources) bool
func (EndpointResources) ResourceName ¶ added in v1.18.0
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 Port uint32 Hostname string // contains filtered or unexported fields }
func NewEndpointsForUpstream ¶
func NewEndpointsForUpstream(us UpstreamWrapper, logger *zap.Logger) *EndpointsForUpstream
func (*EndpointsForUpstream) Add ¶
func (e *EndpointsForUpstream) Add(l krtcollections.PodLocality, emd EndpointWithMd)
func (EndpointsForUpstream) Equals ¶
func (c EndpointsForUpstream) Equals(in EndpointsForUpstream) bool
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 (p EndpointsSettings) Equals(in EndpointsSettings) bool
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 LoadBalancingInfo ¶ added in v1.18.0
type LoadBalancingInfo struct { // Augmented proxy pod labels PodLabels map[string]string // locality info for proxy pod PodLocality krtcollections.PodLocality // dest rule info: PriorityInfo *PriorityInfo }
type NsWithHostname ¶ added in v1.18.0
func (NsWithHostname) String ¶ added in v1.18.0
func (n NsWithHostname) String() string
needed as index key..
type PerClientEnvoyClusters ¶ added in v1.18.0
type PerClientEnvoyClusters struct {
// contains filtered or unexported fields
}
func NewPerClientEnvoyClusters ¶ added in v1.18.0
func NewPerClientEnvoyClusters( ctx context.Context, translator setup.TranslatorFactory, upstreams krt.Collection[UpstreamWrapper], uccs krt.Collection[krtcollections.UniqlyConnectedClient], ks krt.Collection[krtcollections.ResourceWrapper[*gloov1.Secret]], settings krt.Singleton[glookubev1.Settings], destinationRulesIndex DestinationRuleIndex) PerClientEnvoyClusters
func (*PerClientEnvoyClusters) FetchClustersForClient ¶ added in v1.18.0
func (iu *PerClientEnvoyClusters) FetchClustersForClient(kctx krt.HandlerContext, ucc krtcollections.UniqlyConnectedClient) []uccWithCluster
type PerClientEnvoyEndpoints ¶ added in v1.18.0
type PerClientEnvoyEndpoints struct {
// contains filtered or unexported fields
}
func NewPerClientEnvoyEndpoints ¶ added in v1.18.0
func NewPerClientEnvoyEndpoints(logger *zap.Logger, uccs krt.Collection[krtcollections.UniqlyConnectedClient], glooEndpoints krt.Collection[EndpointsForUpstream], destinationRulesIndex DestinationRuleIndex) PerClientEnvoyEndpoints
func (*PerClientEnvoyEndpoints) FetchEndpointsForClient ¶ added in v1.18.0
func (ie *PerClientEnvoyEndpoints) FetchEndpointsForClient(kctx krt.HandlerContext, ucc krtcollections.UniqlyConnectedClient) []UccWithEndpoints
type Prioritizer ¶ added in v1.18.0
type Prioritizer struct {
// contains filtered or unexported fields
}
func NewPriorities ¶ added in v1.18.0
func NewPriorities(failoverPriority []string) *Prioritizer
func (*Prioritizer) GetPriority ¶ added in v1.18.0
func (p *Prioritizer) GetPriority(proxyLabels, upstreamEndpointLabels map[string]string) int
type PriorityInfo ¶ added in v1.18.0
type PriorityInfo struct { FailoverPriority *Prioritizer Failover []*v1alpha3.LocalityLoadBalancerSetting_Failover }
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, initialSettings *glookubev1.Settings, settings krt.Singleton[glookubev1.Settings], controllerName string, writeNamespace string, inputs *GatewayInputChannels, mgr manager.Manager, client kube.Client, augmentedPods krt.Collection[krtcollections.LocalityPod], uniqueClients krt.Collection[krtcollections.UniqlyConnectedClient], 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.
type ProxyTranslator ¶ added in v1.18.0
type ProxyTranslator struct {
// contains filtered or unexported fields
}
func NewProxyTranslator ¶ added in v1.18.0
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 UccWithEndpoints ¶ added in v1.18.0
type UccWithEndpoints struct { Client krtcollections.UniqlyConnectedClient Endpoints envoycache.Resource EndpointsHash uint64 // contains filtered or unexported fields }
func PrioritizeEndpoints ¶ added in v1.18.0
func PrioritizeEndpoints(logger *zap.Logger, destrule *DestinationRuleWrapper, ep EndpointsForUpstream, ucc krtcollections.UniqlyConnectedClient) UccWithEndpoints
func (UccWithEndpoints) Equals ¶ added in v1.18.0
func (c UccWithEndpoints) Equals(in UccWithEndpoints) bool
func (UccWithEndpoints) ResourceName ¶ added in v1.18.0
func (c UccWithEndpoints) ResourceName() string
type UpstreamWrapper ¶
type UpstreamWrapper = krtcollections.ResourceWrapper[*gloov1.Upstream]
UpstreamWrapper provides a keying function for Gloo's `v1.Upstream`