Documentation ¶
Index ¶
- func NewLocalityPodsCollection(nodes krt.Collection[NodeMetadata], pods krt.Collection[*corev1.Pod]) krt.Collection[LocalityPod]
- func NewNodeMetadataCollection(nodes krt.Collection[*corev1.Node]) krt.Collection[NodeMetadata]
- func NewPodsCollection(ctx context.Context, istioClient kube.Client) krt.Collection[LocalityPod]
- type ConnectedClient
- type GlooResource
- type LocalityPod
- type NodeMetadata
- type PodLocality
- type ResourceWrapper
- type UniqlyConnectedClient
- type UniquelyConnectedClientsBulider
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 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 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 (c UniqlyConnectedClient) Equals(k UniqlyConnectedClient) bool
func (UniqlyConnectedClient) ResourceName ¶
func (c UniqlyConnectedClient) ResourceName() string
type UniquelyConnectedClientsBulider ¶
type UniquelyConnectedClientsBulider func(ctx context.Context, augmentedPods krt.Collection[LocalityPod]) krt.Collection[UniqlyConnectedClient]
func NewUniquelyConnectedClients ¶
func NewUniquelyConnectedClients() (xdsserver.Callbacks, UniquelyConnectedClientsBulider)
Click to show internal directories.
Click to hide internal directories.