appender

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultQuantile          = 0.95 // 95th percentile
	ResponseTimeAppenderName = "responseTime"
)
View Source
const DeadNodeAppenderName = "deadNode"
View Source
const IstioAppenderName = "istio"
View Source
const SecurityPolicyAppenderName = "securityPolicy"
View Source
const ServiceEntryAppenderName = "serviceEntry"
View Source
const SidecarsCheckAppenderName = "sidecarsCheck"
View Source
const UnusedNodeAppenderName = "unusedNode"

Variables

This section is empty.

Functions

This section is empty.

Types

type Appender

type Appender interface {
	// AppendGraph performs the appender work on the provided traffic map. The map
	// may be initially empty. An appender is allowed to add or remove map entries.
	AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

	// Name returns a unique appender name and which is the name used to identify the appender (e.g in 'appenders' query param)
	Name() string
}

Appender is implemented by any code offering to append a service graph with supplemental information. On error the appender should panic and it will be handled as an error response.

type DeadNodeAppender added in v0.6.0

type DeadNodeAppender struct{}

DeadNodeAppender is responsible for removing from the graph unwanted nodes:

  • nodes for which there is no traffic reported and the related schema is missing (presumably removed from K8S). (kiali-621)
  • service nodes that are not service entries (kiali-1526) and for which there is no incoming error traffic and no outgoing edges (kiali-1326).

Name: deadNode

func (DeadNodeAppender) AppendGraph added in v0.6.0

func (a DeadNodeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (DeadNodeAppender) Name added in v0.9.1

func (a DeadNodeAppender) Name() string

Name implements Appender

type GlobalInfo added in v0.9.1

type GlobalInfo struct {
	Business       *business.Layer
	PromClient     *prometheus.Client
	ServiceEntries map[string]string
}

GlobalInfo caches information relevant to a single graph. It allows an appender to populate the cache and then it, or another appender can re-use the information. A new instance is generated for graph and is initially empty.

func NewGlobalInfo added in v0.9.1

func NewGlobalInfo() *GlobalInfo

type IstioAppender

type IstioAppender struct{}

IstioAppender is responsible for badging nodes with special Istio significance: - CircuitBreaker: n.Metadata["hasCB"] = true - VirtualService: n.Metadata["hasVS"] = true Name: istio

func (IstioAppender) AppendGraph

func (a IstioAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (IstioAppender) Name added in v0.9.1

func (a IstioAppender) Name() string

Name implements Appender

type NamespaceInfo added in v0.9.1

type NamespaceInfo struct {
	Namespace    string // always provided
	WorkloadList *models.WorkloadList
}

NamespaceInfo caches information relevant to a single namespace. It allows one appender to populate the cache and another to then re-use the information. A new instance is generated for each namespace of a single graph and is initially seeded with only Namespace.

func NewNamespaceInfo added in v0.9.1

func NewNamespaceInfo(namespace string) *NamespaceInfo

type ResponseTimeAppender

type ResponseTimeAppender struct {
	GraphType          string
	InjectServiceNodes bool
	IncludeIstio       bool
	Namespaces         map[string]graph.NamespaceInfo
	Quantile           float64
	QueryTime          int64 // unix time in seconds
}

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. Name: responseTime

func (ResponseTimeAppender) AppendGraph

func (a ResponseTimeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (ResponseTimeAppender) Name added in v0.9.1

func (a ResponseTimeAppender) Name() string

Name implements Appender

type SecurityPolicyAppender added in v0.6.0

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

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 added in v0.6.0

func (a SecurityPolicyAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (SecurityPolicyAppender) Name added in v0.9.1

func (a SecurityPolicyAppender) Name() string

Name implements Appender

type ServiceEntryAppender added in v0.11.0

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

ServiceEntryAppender is responsible for identifying service nodes that are Istio Service Entries. Name: serviceEntry

func (ServiceEntryAppender) AppendGraph added in v0.11.0

func (a ServiceEntryAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (ServiceEntryAppender) Name added in v0.11.0

func (a ServiceEntryAppender) Name() string

Name implements Appender

type SidecarsCheckAppender

type SidecarsCheckAppender struct{}

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 *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (SidecarsCheckAppender) Name added in v0.9.1

func (a SidecarsCheckAppender) Name() string

Name implements Appender

type UnusedNodeAppender added in v0.6.0

type UnusedNodeAppender struct {
	GraphType   string // This appender does not operate on service graphs because it adds workload nodes.
	IsNodeGraph bool   // This appender does not operate on node detail graphs because we want to focus on the specific node.
}

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

func (UnusedNodeAppender) AppendGraph added in v0.6.0

func (a UnusedNodeAppender) AppendGraph(trafficMap graph.TrafficMap, globalInfo *GlobalInfo, namespaceInfo *NamespaceInfo)

AppendGraph implements Appender

func (UnusedNodeAppender) Name added in v0.9.1

func (a UnusedNodeAppender) Name() string

Name implements Appender

Jump to

Keyboard shortcuts

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