Documentation ¶
Index ¶
- Variables
- func ApplyDestRulesForUpstream(destrule *DestinationRuleWrapper, u *gloov1.Upstream) (*gloov1.Upstream, string)
- func LbPriority(proxyLocality, endpointsLocality *envoy_config_core_v3.Locality) int
- func SetupCollectionDynamic[T any](ctx context.Context, client kube.Client, gvr schema.GroupVersionResource, ...) krt.Collection[*T]
- type DestinationRuleIndex
- type DestinationRuleWrapper
- type EndpointResources
- type GatewayInputChannels
- type LoadBalancingInfo
- type NsWithHostname
- type PerClientEnvoyClusters
- type PerClientEnvoyEndpoints
- type Prioritizer
- type PriorityInfo
- type ProxySyncer
- type ProxyTranslator
- type RedactedSecret
- type SecretInputs
- type UccWithEndpoints
- type XdsSnapWrapper
Constants ¶
This section is empty.
Variables ¶
var (
UseDetailedUnmarshalling = envutils.IsEnvTruthy("DETAILED_SNAP_UNMARSHALLING")
)
Functions ¶
func LbPriority ¶
func LbPriority(proxyLocality, endpointsLocality *envoy_config_core_v3.Locality) int
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
Types ¶
type DestinationRuleIndex ¶
type DestinationRuleIndex struct { Destrules krt.Collection[DestinationRuleWrapper] ByHostname krt.Index[NsWithHostname, DestinationRuleWrapper] }
func NewDestRuleIndex ¶
func NewDestRuleIndex(istioClient kube.Client, dbg *krt.DebugHandler) DestinationRuleIndex
func NewEmptyDestRuleIndex ¶
func NewEmptyDestRuleIndex() DestinationRuleIndex
func (*DestinationRuleIndex) FetchDestRulesFor ¶
func (d *DestinationRuleIndex) FetchDestRulesFor(kctx krt.HandlerContext, proxyNs string, hostname string, podLabels map[string]string) *DestinationRuleWrapper
type DestinationRuleWrapper ¶
type DestinationRuleWrapper struct {
*networkingclient.DestinationRule
}
func (DestinationRuleWrapper) Equals ¶
func (c DestinationRuleWrapper) Equals(k DestinationRuleWrapper) bool
func (DestinationRuleWrapper) GetLabelSelector ¶
func (s DestinationRuleWrapper) GetLabelSelector() map[string]string
important for FilterSelects below
func (DestinationRuleWrapper) ResourceName ¶
func (c DestinationRuleWrapper) ResourceName() string
func (DestinationRuleWrapper) String ¶
func (c DestinationRuleWrapper) String() string
type EndpointResources ¶
type EndpointResources struct { Endpoints envoycache.Resource EndpointsVersion uint64 UpstreamRef types.NamespacedName }
func TransformEndpointToResources ¶
func TransformEndpointToResources(ep krtcollections.EndpointsForUpstream) *EndpointResources
func (EndpointResources) Equals ¶
func (c EndpointResources) Equals(in EndpointResources) bool
func (EndpointResources) ResourceName ¶
func (c EndpointResources) 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 ¶
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 ¶
type PerClientEnvoyClusters ¶
type PerClientEnvoyClusters struct {
// contains filtered or unexported fields
}
func NewPerClientEnvoyClusters ¶
func NewPerClientEnvoyClusters( ctx context.Context, dbg *krt.DebugHandler, translator setup.TranslatorFactory, upstreams krt.Collection[krtcollections.UpstreamWrapper], uccs krt.Collection[krtcollections.UniqlyConnectedClient], ks krt.Collection[RedactedSecret], settings krt.Singleton[glookubev1.Settings], destinationRulesIndex DestinationRuleIndex, ) PerClientEnvoyClusters
func (*PerClientEnvoyClusters) FetchClustersForClient ¶
func (iu *PerClientEnvoyClusters) FetchClustersForClient(kctx krt.HandlerContext, ucc krtcollections.UniqlyConnectedClient) []uccWithCluster
type PerClientEnvoyEndpoints ¶
type PerClientEnvoyEndpoints struct {
// contains filtered or unexported fields
}
func NewPerClientEnvoyEndpoints ¶
func NewPerClientEnvoyEndpoints(logger *zap.Logger, dbg *krt.DebugHandler, uccs krt.Collection[krtcollections.UniqlyConnectedClient], glooEndpoints krt.Collection[krtcollections.EndpointsForUpstream], destinationRulesIndex DestinationRuleIndex, ) PerClientEnvoyEndpoints
func (*PerClientEnvoyEndpoints) FetchEndpointsForClient ¶
func (ie *PerClientEnvoyEndpoints) FetchEndpointsForClient(kctx krt.HandlerContext, ucc krtcollections.UniqlyConnectedClient) []UccWithEndpoints
type Prioritizer ¶
type Prioritizer struct {
// contains filtered or unexported fields
}
func NewPriorities ¶
func NewPriorities(failoverPriority []string) *Prioritizer
func (*Prioritizer) GetPriority ¶
func (p *Prioritizer) GetPriority(proxyLabels, upstreamEndpointLabels map[string]string) int
type PriorityInfo ¶
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.
func (*ProxySyncer) Init ¶
func (s *ProxySyncer) Init(ctx context.Context, dbg *krt.DebugHandler) 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 RedactedSecret ¶
type RedactedSecret krtcollections.ResourceWrapper[*gloov1.Secret]
func (RedactedSecret) Equals ¶
func (us RedactedSecret) Equals(in RedactedSecret) bool
func (RedactedSecret) MarshalJSON ¶
func (l RedactedSecret) MarshalJSON() ([]byte, error)
func (RedactedSecret) ResourceName ¶
func (us RedactedSecret) ResourceName() string
type SecretInputs ¶
type SecretInputs struct {
Secrets v1.SecretList
}
type UccWithEndpoints ¶
type UccWithEndpoints struct { Client krtcollections.UniqlyConnectedClient Endpoints envoycache.Resource EndpointsHash uint64 // contains filtered or unexported fields }
func PrioritizeEndpoints ¶
func PrioritizeEndpoints(logger *zap.Logger, destrule *DestinationRuleWrapper, ep krtcollections.EndpointsForUpstream, ucc krtcollections.UniqlyConnectedClient) UccWithEndpoints
func (UccWithEndpoints) Equals ¶
func (c UccWithEndpoints) Equals(in UccWithEndpoints) bool
func (UccWithEndpoints) ResourceName ¶
func (c UccWithEndpoints) ResourceName() string
type XdsSnapWrapper ¶
type XdsSnapWrapper struct {
// contains filtered or unexported fields
}
func (XdsSnapWrapper) Equals ¶
func (p XdsSnapWrapper) Equals(in XdsSnapWrapper) bool
func (XdsSnapWrapper) MarshalJSON ¶
func (p XdsSnapWrapper) MarshalJSON() (out []byte, err error)
note: this is feature gated, as i'm not confident the new logic can't panic, in all envoy configs once 1.18 is out, we can remove the feature gate.
func (XdsSnapWrapper) ResourceName ¶
func (p XdsSnapWrapper) ResourceName() string
func (XdsSnapWrapper) WithSnapshot ¶
func (p XdsSnapWrapper) WithSnapshot(snap *xds.EnvoySnapshot) XdsSnapWrapper