krtcollections

package
v1.18.0-beta33 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalityPodsCollection

func NewLocalityPodsCollection(nodes krt.Collection[NodeMetadata], pods krt.Collection[*corev1.Pod]) krt.Collection[LocalityPod]

func NewNodeMetadataCollection

func NewNodeMetadataCollection(nodes krt.Collection[*corev1.Node]) krt.Collection[NodeMetadata]

func NewPodsCollection

func NewPodsCollection(ctx context.Context, istioClient kube.Client) krt.Collection[LocalityPod]

Types

type ConnectedClient

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

type GlooResource

type GlooResource interface {
	proto.Message
	interface {
		GetMetadata() *core.Metadata
	}
}

type LocalityPod

type LocalityPod struct {
	krt.Named
	Locality        PodLocality
	AugmentedLabels map[string]string
}

func (LocalityPod) Equals

func (c LocalityPod) Equals(in LocalityPod) bool

type NodeMetadata

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

func (NodeMetadata) Equals

func (c NodeMetadata) Equals(in NodeMetadata) bool

func (NodeMetadata) ResourceName

func (c NodeMetadata) ResourceName() string

type PodLocality

type PodLocality struct {
	Region  string
	Zone    string
	Subzone string
}

type ResourceWrapper

type ResourceWrapper[T GlooResource] struct {
	Inner T
}

func (ResourceWrapper[T]) Equals

func (us ResourceWrapper[T]) Equals(in ResourceWrapper[T]) bool

func (ResourceWrapper[T]) GetMetadata

func (us ResourceWrapper[T]) GetMetadata() *core.Metadata

func (ResourceWrapper[T]) ResourceName

func (us ResourceWrapper[T]) ResourceName() string

func (ResourceWrapper[T]) String

func (us ResourceWrapper[T]) String() string

type UniqlyConnectedClient

type UniqlyConnectedClient struct {
	Role      string
	Labels    map[string]string
	Locality  PodLocality
	Namespace string
	// contains filtered or unexported fields
}

Certain parts of translation (mainly priority failover) require different translation for different clients (for example, 2 envoys on different AZs). This collection represents the unique clients (envoys) that are connected to the xds server. by unique we mean same namespace, role, labels (which include locality). This collection is populated using xds server callbacks. When an envoy connects to us, we grab it's pod name/namesspace from the requests node->id. We then fetch that pod to get its labels, create a UniqlyConnectedClient and it them to the collection.

func (UniqlyConnectedClient) Equals

func (UniqlyConnectedClient) ResourceName

func (c UniqlyConnectedClient) ResourceName() string

type UniquelyConnectedClientsBulider

type UniquelyConnectedClientsBulider func(ctx context.Context, augmentedPods krt.Collection[LocalityPod]) krt.Collection[UniqlyConnectedClient]

Jump to

Keyboard shortcuts

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