Documentation ¶
Index ¶
- func Cleanup()
- func GetReportJSON() string
- func Init(kubeconfigPath string) error
- func PrintReport()
- func RunAPIServerHealthCheck() (bool, error)
- func RunDstConnectivityCheck(dstIP string) (bool, error)
- func RunDstSvcEndpointsConnectivityCheck(endpoints []Endpoint) (bool, error)
- func RunGatewayConnectivityCheck() (bool, error)
- func RunHostChecks()
- func RunK8sDNSLookupCheck(dnsServerIP, dstSvcName, dstSvcNamespace, dstSvcExpectedIP string) (bool, error)
- func RunKubeAPIEndpointIPConnectivityCheck() (bool, error)
- func RunKubeAPIServiceIPConnectivityCheck() (bool, error)
- func RunMTUProbeToDstIPCheck(dstIP string) (bool, error)
- func RunPodChecks()
- type Check
- type Checker
- type Config
- type Endpoint
- type Pod
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReportJSON ¶
func GetReportJSON() string
GetReportJSON returns allChecks object as a JSON string
func RunAPIServerHealthCheck ¶
RunAPIServerHealthCheck checks api server health using livez endpoint
func RunDstConnectivityCheck ¶
RunDstConnectivityCheck checks connectivity to destination specified by dstIP
func RunDstSvcEndpointsConnectivityCheck ¶
RunDstSvcEndpointsConnectivityCheck checks connectivity from SrcPod to all IPs provided to this checker
func RunGatewayConnectivityCheck ¶
RunGatewayConnectivityCheck checks connectivity to default gw
func RunK8sDNSLookupCheck ¶
func RunK8sDNSLookupCheck(dnsServerIP, dstSvcName, dstSvcNamespace, dstSvcExpectedIP string) (bool, error)
RunK8sDNSLookupCheck checks DNS lookup functionality for a given K8s service
func RunKubeAPIEndpointIPConnectivityCheck ¶
RunKubeAPIEndpointIPConnectivityCheck checks connectivity to k8s api server via each endpoint (nodeIP)
func RunKubeAPIServiceIPConnectivityCheck ¶
RunKubeAPIServiceIPConnectivityCheck checks connectivity to K8s api service via clusterIP
func RunMTUProbeToDstIPCheck ¶
RunMTUProbeToDstIPCheck checks path-MTU by probing the traffic path using icmp messages
func RunPodChecks ¶
func RunPodChecks()
RunPodChecks runs checks from within the Pod network namespace
Types ¶
type Check ¶
type Check struct { Name string `json:"name"` Success bool `json:"success"` ErrorMsg error `json:"error_msg"` }
Check describes the reporting structure for a network check
type Checker ¶
type Checker struct { PodChecks []Check `json:"pod_checks,omitempty"` HostChecks []Check `json:"host_checks"` }
Checker stores check names and results for all of the checks
type Config ¶
type Config struct { SrcPod Pod DstPod Pod DstSvc Service ExternalIP string KubeconfigPath string KubeAPIService Endpoint KubeDNSService Endpoint HostGatewayIP string }
Config struct represents the properties required by k8snetlook to run checks most properties are populated from user input
var Cfg Config
Cfg is an instance of Config struct