verifier

package
v0.0.0-...-4b75dde Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 46 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

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

ControlPlaneHealthVerifier implements the Verifier interface for control plane health

func (*ControlPlaneHealthVerifier) Run

Run executes the control plane health verifier

type EgressConnectivityVerifier

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

EgressConnectivityVerifier implements the Verifier interface for egress connectivity

func (*EgressConnectivityVerifier) Run

Run executes the pod connectivity verifier

type EnvoyConfigVerifier

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

EnvoyConfigVerifier implements the Verifier interface for Envoy configs

func (*EnvoyConfigVerifier) Run

func (v *EnvoyConfigVerifier) Run() Result

Run executes the Envoy config verifier

type IngressBackendVerifier

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

IngressBackendVerifier implements the Verifier interface for ingressbackend verification

func (*IngressBackendVerifier) Run

func (v *IngressBackendVerifier) Run() Result

Run runs the IngressBackend verifier

type IngressConnectivityVerifier

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

IngressConnectivityVerifier implements verification for pod connectivity

func (*IngressConnectivityVerifier) Run

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

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

PodProbeVerifier implements the Verifier interface for control plane health probes

func (*PodProbeVerifier) Run

func (v *PodProbeVerifier) Run() Result

Run executes the verifier for pod health probe

type PodStatusVerifier

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

PodStatusVerifier implements the Verifier interface for control plane health

func (*PodStatusVerifier) Run

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

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

SidecarVerifier implements the Verifier interface for Envoy sidecar

func (*SidecarVerifier) Run

func (v *SidecarVerifier) Run() Result

Run executes the sidecar verifier

type SidecarVerifierOpt

type SidecarVerifierOpt func(*SidecarVerifier)

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

func WithVerifyAbsence

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

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

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

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

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

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

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

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

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

NewPodStatusVerifier implements verification for control plane health

func NewSidecarVerifier

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