verifier

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 45 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, markerDepth int)

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

	// Secrets is an Envoy xDS proto.
	Secrets 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 ControlPlaneHealthVerifier added in v1.2.0

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

ControlPlaneHealthVerifier implements the Verifier interface for control plane health

func (*ControlPlaneHealthVerifier) Run added in v1.2.0

Run executes the control plane health verifier

type EgressConnectivityVerifier added in v1.2.0

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

EgressConnectivityVerifier implements the Verifier interface for egress connectivity

func (*EgressConnectivityVerifier) Run added in v1.2.0

Run executes the pod connectivity verifier

type EnvoyConfigVerifier added in v1.2.0

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

EnvoyConfigVerifier implements the Verifier interface for Envoy configs

func (*EnvoyConfigVerifier) Run added in v1.2.0

func (v *EnvoyConfigVerifier) Run() Result

Run executes the Envoy config verifier

type IngressBackendVerifier added in v1.2.0

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

IngressBackendVerifier implements the Verifier interface for ingressbackend verification

func (*IngressBackendVerifier) Run added in v1.2.0

func (v *IngressBackendVerifier) Run() Result

Run runs the IngressBackend verifier

type IngressConnectivityVerifier added in v1.2.0

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

IngressConnectivityVerifier implements verification for pod connectivity

func (*IngressConnectivityVerifier) Run added in v1.2.0

Run executes the pod connectivity verifier

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 PodProbeVerifier added in v1.2.0

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

PodProbeVerifier implements the Verifier interface for control plane health probes

func (*PodProbeVerifier) Run added in v1.2.0

func (v *PodProbeVerifier) Run() Result

Run executes the verifier for pod health probe

type PodStatusVerifier added in v1.2.0

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

PodStatusVerifier implements the Verifier interface for control plane health

func (*PodStatusVerifier) Run added in v1.2.0

func (v *PodStatusVerifier) Run() Result

Run executes the pod status 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 SidecarVerifier added in v1.2.0

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

SidecarVerifier implements the Verifier interface for Envoy sidecar

func (*SidecarVerifier) Run added in v1.2.0

func (v *SidecarVerifier) Run() Result

Run executes the sidecar verifier

type SidecarVerifierOpt added in v1.2.0

type SidecarVerifierOpt func(*SidecarVerifier)

SidecarVerifierOpt exposes a way to modify the behavior of the sidecar verifier without modifying the base contract

func WithVerifyAbsence added in v1.2.0

func WithVerifyAbsence() SidecarVerifierOpt

WithVerifyAbsence sets verifyAbsence to true

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 TrafficAttribute added in v1.2.0

type TrafficAttribute struct {
	SrcPod         *types.NamespacedName
	SrcService     *types.NamespacedName
	DstPod         *types.NamespacedName
	DstService     *types.NamespacedName
	IngressBackend *types.NamespacedName
	DstPort        uint16
	ExternalHost   string
	ExternalPort   uint16
	AppProtocol    string
	IsIngress      bool
}

TrafficAttribute describes the attributes of the traffic

type Verifier

type Verifier interface {
	Run() Result
}

Verifier defines the interface to perform a verification

func NewControlPlaneHealthVerifier added in v1.2.0

func NewControlPlaneHealthVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface, restConfig *rest.Config, namespace string) Verifier

NewControlPlaneHealthVerifier implements verification for control plane health

func NewEgressConnectivityVerifier added in v1.2.0

func NewEgressConnectivityVerifier(stdout io.Writer, stderr io.Writer, restConfig *rest.Config, kubeClient kubernetes.Interface,
	meshConfig *configv1alpha2.MeshConfig, trafficAttr TrafficAttribute,
	meshName string) Verifier

NewEgressConnectivityVerifier implements verification for egress connectivity

func NewEnvoyConfigVerifier added in v1.2.0

func NewEnvoyConfigVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface,
	meshConfig *configv1alpha2.MeshConfig, configAttr configAttribute) Verifier

NewEnvoyConfigVerifier returns a Verifier for Envoy config verification

func NewIngressBackendVerifier added in v1.2.0

func NewIngressBackendVerifier(stdout io.Writer, stderr io.Writer, policyClient policyClientset.Interface, backendProtocol string, backendPort uint16, ingressBackend, ingressService types.NamespacedName) Verifier

NewIngressBackendVerifier creates a new IngressBackendVerifier

func NewIngressConnectivityVerifier added in v1.2.0

func NewIngressConnectivityVerifier(stdout io.Writer, stderr io.Writer, restConfig *rest.Config, kubeClient kubernetes.Interface,
	policyClient policyClientset.Interface, meshConfig *configv1alpha2.MeshConfig, trafficAttr TrafficAttribute,
	meshName string) Verifier

NewIngressConnectivityVerifier creates a new IngressConnectivityVerifier

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, restConfig *rest.Config, kubeClient kubernetes.Interface,
	meshConfig *configv1alpha2.MeshConfig, trafficAttr TrafficAttribute,
	meshName string) Verifier

NewPodConnectivityVerifier implements verification for pod connectivity

func NewPodProbeVerifier added in v1.2.0

func NewPodProbeVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface,
	app types.NamespacedName, httpProber httpProber) Verifier

NewPodProbeVerifier implements verification for control plane health probes

func NewPodStatusVerifier added in v1.2.0

func NewPodStatusVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface, app types.NamespacedName) Verifier

NewPodStatusVerifier implements verification for control plane health

func NewSidecarVerifier added in v1.2.0

func NewSidecarVerifier(stdout io.Writer, stderr io.Writer, kubeClient kubernetes.Interface, pod types.NamespacedName, opts ...SidecarVerifierOpt) Verifier

NewSidecarVerifier returns a Verifier for Envoy sidecar verification

Jump to

Keyboard shortcuts

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