appender

package
v1.65.11 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const (
	AggregateNodeAppenderName = "aggregateNode"
)
View Source
const DeadNodeAppenderName = "deadNode"
View Source
const HealthAppenderName = "health"
View Source
const IdleNodeAppenderName = "idleNode"
View Source
const IstioAppenderName = "istio"
View Source
const LabelerAppenderName = "labeler"
View Source
const OutsiderAppenderName = "outsider"
View Source
const (
	// ResponseTimeAppenderName uniquely identifies the appender: responseTime
	ResponseTimeAppenderName = "responseTime"
)
View Source
const (
	SecurityPolicyAppenderName = "securityPolicy"
)
View Source
const ServiceEntryAppenderName = "serviceEntry"
View Source
const SidecarsCheckAppenderName = "sidecarsCheck"
View Source
const (
	// ThroughputAppenderName uniquely identifies the appender: throughput
	ThroughputAppenderName = "throughput"
)
View Source
const TrafficGeneratorAppenderName = "trafficGenerator"
View Source
const WorkloadEntryAppenderName = "workloadEntry"

Variables

This section is empty.

Functions

func ParseAppenders

func ParseAppenders(o graph.TelemetryOptions) (appenders []graph.Appender, finalizers []graph.Appender)

ParseAppenders determines which appenders should run for this graphing request

Types

type AggregateNodeAppender added in v1.21.0

type AggregateNodeAppender struct {
	Aggregate          string
	AggregateValue     string
	GraphType          string
	InjectServiceNodes bool
	Namespaces         map[string]graph.NamespaceInfo
	QueryTime          int64 // unix time in seconds
	Rates              graph.RequestedRates
	Service            string
}

AggregateNodeAppender is responsible for injecting aggregate nodes into the graph to gain visibility into traffic aggregations for a user-specfied metric attribute. Note: Aggregate Nodes are supported only on Requests traffic (not TCP or gRPC-message traffic)

func (AggregateNodeAppender) AppendGraph added in v1.21.0

func (a AggregateNodeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (AggregateNodeAppender) IsFinalizer added in v1.48.0

func (a AggregateNodeAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (AggregateNodeAppender) Name added in v1.21.0

func (a AggregateNodeAppender) Name() string

Name implements Appender

type DeadNodeAppender

type DeadNodeAppender struct{}

DeadNodeAppender is responsible for removing from the graph unwanted nodes:

  • nodes for which there is no traffic reported and a backing workload that can't be found (presumably removed from K8S). (kiali-621)
  • this includes "unknown"
  • service nodes that are not service entries (kiali-1526), egress handlers and for which there is no incoming traffic or outgoing edges error traffic and no outgoing edges (kiali-1326).

Name: deadNode

func (DeadNodeAppender) AppendGraph

func (a DeadNodeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (DeadNodeAppender) IsFinalizer added in v1.48.0

func (a DeadNodeAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (DeadNodeAppender) Name

func (a DeadNodeAppender) Name() string

Name implements Appender

type HealthAppender added in v1.48.0

type HealthAppender struct {
	Namespaces        graph.NamespaceInfoMap
	QueryTime         int64 // unix time in seconds
	RequestedDuration time.Duration
}

HealthAppender is responsible for adding the information needed to perform client-side health calculations. This includes both health configuration, and health data, to the graph. TODO: replace this with server-side health calculation, and report only the health results. Name: health

func (HealthAppender) AppendGraph added in v1.48.0

func (a HealthAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, _ *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (HealthAppender) IsFinalizer added in v1.48.0

func (a HealthAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (HealthAppender) Name added in v1.48.0

func (a HealthAppender) Name() string

Name implements Appender

type IdleNodeAppender added in v1.29.0

type IdleNodeAppender struct {
	GraphType          string
	InjectServiceNodes bool // This appender adds idle services only when service nodes are injected or graphType=service
	IsNodeGraph        bool // This appender does not operate on node detail graphs because we want to focus on the specific node.
}

IdleNodeAppender looks for services that have never seen request traffic. It adds nodes to represent the idle/unused definitions. The added node types depend on the graph type and/or labeling on the definition. Name: idleNode

func (IdleNodeAppender) AppendGraph added in v1.29.0

func (a IdleNodeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (IdleNodeAppender) IsFinalizer added in v1.48.0

func (a IdleNodeAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (IdleNodeAppender) Name added in v1.29.0

func (a IdleNodeAppender) Name() string

Name implements Appender

type IstioAppender

type IstioAppender struct {
	AccessibleNamespaces map[string]time.Time
}

IstioAppender is responsible for badging nodes with special Istio significance: - CircuitBreaker: n.Metadata[HasCB] = true - Ingress Gateways: n.Metadata[IsIngressGateway] = Map of GatewayName => hosts - VirtualService: n.Metadata[HasVS] = Map of VirtualServiceName => hosts Name: istio

func (IstioAppender) AppendGraph

func (a IstioAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (IstioAppender) IsFinalizer added in v1.48.0

func (a IstioAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (IstioAppender) Name

func (a IstioAppender) Name() string

Name implements Appender

type LabelerAppender added in v1.48.0

type LabelerAppender struct{}

LabelerAppender is responsible for obtaining and attaching all k8s labels to all nodes in the graph. Name: labeler

func (*LabelerAppender) AppendGraph added in v1.48.0

func (f *LabelerAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, _namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (LabelerAppender) IsFinalizer added in v1.48.0

func (a LabelerAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (*LabelerAppender) Name added in v1.48.0

func (f *LabelerAppender) Name() string

Name implements Appender

type OutsiderAppender added in v1.48.0

type OutsiderAppender struct {
	AccessibleNamespaces map[string]time.Time
	Namespaces           graph.NamespaceInfoMap
}

OutsiderAppender is responsible for marking the outsiders (i.e. nodes not in the requested namespaces) and inaccessible nodes Name: outsider

func (*OutsiderAppender) AppendGraph added in v1.48.0

func (a *OutsiderAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, _namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (OutsiderAppender) IsFinalizer added in v1.48.0

func (a OutsiderAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (*OutsiderAppender) Name added in v1.48.0

func (a *OutsiderAppender) Name() string

Name implements Appender

type PolicyRates

type PolicyRates map[string]float64

type ResponseTimeAppender

type ResponseTimeAppender struct {
	GraphType          string
	InjectServiceNodes bool
	Namespaces         graph.NamespaceInfoMap
	Quantile           float64
	QueryTime          int64 // unix time in seconds
	Rates              graph.RequestedRates
}

ResponseTimeAppender is responsible for adding responseTime information to the graph. ResponseTime is represented as a percentile value. The default is 95th percentile, which means that 95% of requests executed in no more than the resulting milliseconds. ResponeTime values are reported in milliseconds. Response Times are reported using destination proxy telemetry, when available, which should remove network latency fluctuations. TODO: Should we report both source and destination when possible (with and without latency)? Name: responseTime

func (ResponseTimeAppender) AppendGraph

func (a ResponseTimeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (ResponseTimeAppender) IsFinalizer added in v1.48.0

func (a ResponseTimeAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (ResponseTimeAppender) Name

func (a ResponseTimeAppender) Name() string

Name implements Appender

type SecurityPolicyAppender

type SecurityPolicyAppender struct {
	GraphType          string
	InjectServiceNodes bool
	Namespaces         map[string]graph.NamespaceInfo
	QueryTime          int64 // unix time in seconds
	Rates              graph.RequestedRates
}

SecurityPolicyAppender is responsible for adding securityPolicy information to the graph. The appender currently reports only mutual_tls security although is written in a generic way. Name: securityPolicy

func (SecurityPolicyAppender) AppendGraph

func (a SecurityPolicyAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (SecurityPolicyAppender) IsFinalizer added in v1.48.0

func (a SecurityPolicyAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (SecurityPolicyAppender) Name

func (a SecurityPolicyAppender) Name() string

Name implements Appender

type ServiceEntryAppender

type ServiceEntryAppender struct {
	AccessibleNamespaces map[string]time.Time
	GraphType            string // This appender does not operate on service graphs because it adds workload nodes.
}

ServiceEntryAppender is responsible for identifying service nodes that are defined in Istio as a serviceEntry. A single serviceEntry can define multiple hosts and as such multiple service nodes may map to different hosts of a single serviceEntry. We'll call these "se-service" nodes. The appender handles this in the following way:

For Each "se-service" node
   if necessary, create an aggregate serviceEntry node ("se-aggregate")
     -- an "se-aggregate" is a service node with isServiceEntry set in the metadata
     -- an "se-aggregate" is namespace-specific and so one service entry definition can result in multiple
        service entry nodes in the graph. An Istio service entry is defined in a particular namespace, but
        it can be "exported" to many (all namespaces by default).  So, think as if the service entry
        definition is duplicated in each exported namespace, and therefore you can get an se-aggregate in each.
   aggregate the "se-service" node into the "se-aggregate" node
     -- incoming edges
     -- outgoing edges (unusual but can have outgoing edge to egress gateway)
     -- per-host traffic (in the metadata)
   remove the "se-service" node from the trafficMap
   add any new "se-aggregate" node to the trafficMap

Doc Links - https://istio.io/docs/reference/config/networking/v1alpha3/service-entry/#ServiceEntry - https://istio.io/docs/examples/advanced-gateways/wildcard-egress-hosts/

A note about wildcard hosts. External service entries allow for prefix wildcarding such that many different service requests may be handled by the same service entry definition. For example, host = *.wikipedia.com would match requests for en.wikipedia.com and de.wikipedia.com. The Istio telemetry produces only one "se-service" node with the wilcard host as the destination_service_name.

func (ServiceEntryAppender) AppendGraph

func (a ServiceEntryAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (ServiceEntryAppender) IsFinalizer added in v1.48.0

func (a ServiceEntryAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (ServiceEntryAppender) Name

func (a ServiceEntryAppender) Name() string

Name implements Appender

type SidecarsCheckAppender

type SidecarsCheckAppender struct {
	AccessibleNamespaces map[string]time.Time
}

SidecarsCheckAppender flags nodes whose backing workloads are missing at least one Envoy sidecar. Note that a node with no backing workloads is not flagged. Name: sidecarsCheck

func (SidecarsCheckAppender) AppendGraph

func (a SidecarsCheckAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (SidecarsCheckAppender) IsFinalizer added in v1.48.0

func (a SidecarsCheckAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (SidecarsCheckAppender) Name

func (a SidecarsCheckAppender) Name() string

Name implements Appender

type ThroughputAppender added in v1.36.0

type ThroughputAppender struct {
	GraphType          string
	InjectServiceNodes bool
	Namespaces         graph.NamespaceInfoMap
	QueryTime          int64 // unix time in seconds
	Rates              graph.RequestedRates
	ThroughputType     string
}

ThroughputAppender is responsible for adding throughput information to the graph. Throughput is represented as bytes/sec. Throughput may be for request bytes or response bytes depending on the options. Request throughput will be reported using source telemetry, response throughput using destination telemetry. Name: throughput

func (ThroughputAppender) AppendGraph added in v1.36.0

func (a ThroughputAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (ThroughputAppender) IsFinalizer added in v1.48.0

func (a ThroughputAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (ThroughputAppender) Name added in v1.36.0

func (a ThroughputAppender) Name() string

Name implements Appender

type TrafficGeneratorAppender added in v1.48.0

type TrafficGeneratorAppender struct{}

TrafficGeneratorAppender is responsible for marking the insider traffic generator nodes (i.e. inside the namespace and only having outgoing edges) Name: trafficGenerator

func (*TrafficGeneratorAppender) AppendGraph added in v1.48.0

func (f *TrafficGeneratorAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, _namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (TrafficGeneratorAppender) IsFinalizer added in v1.48.0

func (a TrafficGeneratorAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (*TrafficGeneratorAppender) Name added in v1.48.0

func (f *TrafficGeneratorAppender) Name() string

Name implements Appender

type WorkloadEntryAppender added in v1.40.0

type WorkloadEntryAppender struct {
	GraphType string
}

WorkloadEntryAppender correlates trafficMap nodes to corresponding WorkloadEntry Istio objects. If the trafficMap node has a matching WorkloadEntry, a label is added to the node's Metadata. Matching is determined by the "app" and "version" labels on both the trafficMap node and the WorkloadEntry object being equivalent. A workload can have multiple matches.

func (WorkloadEntryAppender) AppendGraph added in v1.40.0

func (a WorkloadEntryAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *graph.AppenderGlobalInfo, namespaceInfo *graph.AppenderNamespaceInfo)

AppendGraph implements Appender

func (WorkloadEntryAppender) IsFinalizer added in v1.48.0

func (a WorkloadEntryAppender) IsFinalizer() bool

IsFinalizer implements Appender

func (WorkloadEntryAppender) Name added in v1.40.0

func (a WorkloadEntryAppender) Name() string

Name implements Appender

Jump to

Keyboard shortcuts

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