verifier

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(result Result, w io.Writer)

Print prints the Result

Types

type Config

type Config struct {
	// Boostrap is an Envoy xDS proto.
	Boostrap adminv3.BootstrapConfigDump

	// Clusters is an Envoy xDS proto.
	Clusters adminv3.ClustersConfigDump

	// Endpoints is an Envoy xDS proto.
	Endpoints adminv3.EndpointsConfigDump

	// Listeners is an Envoy xDS proto.
	Listeners adminv3.ListenersConfigDump

	// SecretsConfigDump is an Envoy xDS proto.
	SecretsConfigDump adminv3.SecretsConfigDump

	// ScopedRoutesConfigDump is an Envoy xDS proto.
	ScopedRoutesConfigDump adminv3.ScopedRoutesConfigDump

	// Routes is an Envoy xDS proto.
	Routes adminv3.RoutesConfigDump
}

Config is Envoy config dump.

type ConfigGetter

type ConfigGetter interface {
	// Get returns the Envoy config
	Get() (*Config, error)
}

ConfigGetter is an interface for getting Envoy config from Pods' sidecars

type NamespaceMonitorVerifier

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

NamespaceMonitorVerifier implements the Verifier interface for pod connectivity

func (*NamespaceMonitorVerifier) Run

Run executes the namespace monitor verification

type PodConfigGetter

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

PodConfigGetter implements the ConfigGetter interface

func (PodConfigGetter) Get

func (g PodConfigGetter) Get() (*Config, error)

Get returns the parsed Envoy config dump

type PodConnectivityVerifier

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

PodConnectivityVerifier implements the Verifier interface for pod connectivity

func (*PodConnectivityVerifier) Run

Run executes the pod connectivity verifier

type Result

type Result struct {
	Context       string
	Status        Status
	Reason        string
	Suggestion    string
	NestedResults []*Result
}

Result defines the result returned by a Verifier instance

type Set

type Set []Verifier

Set is a collection of Verifier objects

func (Set) Run

func (verifiers Set) Run(ctx string) Result

Run executes runs the verification for each verifier in the list

type Status

type Status string

Status is a type describing the status of a verification

const (
	// Success indicates the verification succeeded
	Success Status = "Success"

	// Failure indicates the verification failed
	Failure Status = "Failure"

	// Unknown indicates the result of the verification could not be determined
	Unknown Status = "Unknown"
)

func (Status) Color

func (s Status) Color() string

Color returns a color coded string for the verification status

type Verifier

type Verifier interface {
	Run() Result
}

Verifier defines the interface to perform a verification

func NewNamespaceMonitorVerifier

func NewNamespaceMonitorVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface, namespace string, meshName string) Verifier

NewNamespaceMonitorVerifier implements verification for namespace monitoring

func NewPodConnectivityVerifier

func NewPodConnectivityVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface,
	srcPod types.NamespacedName, dstPod types.NamespacedName, appProtocol string, meshName string) Verifier

NewPodConnectivityVerifier implements verification for pod connectivity

Jump to

Keyboard shortcuts

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