analyzer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AnalyzerErrorsMetric = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Name: "analyzer_errors",
		Help: "Number of errors detected by analyzer",
	}, []string{"analyzer_name", "object_name", "namespace"})
)

Functions

func CheckCronScheduleIsValid

func CheckCronScheduleIsValid(schedule string) (bool, error)

Check CRON schedule format

func FetchLatestEvent

func FetchLatestEvent(ctx context.Context, kubernetesClient *kubernetes.Client, namespace string, name string) (*v1.Event, error)

func GetAnalyzerMap

func GetAnalyzerMap() (map[string]common.IAnalyzer, map[string]common.IAnalyzer)

func ListFilters

func ListFilters() ([]string, []string, []string)

Types

type CronJobAnalyzer

type CronJobAnalyzer struct{}

func (CronJobAnalyzer) Analyze

func (analyzer CronJobAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type DeploymentAnalyzer

type DeploymentAnalyzer struct {
}

DeploymentAnalyzer is an analyzer that checks for misconfigured Deployments

func (DeploymentAnalyzer) Analyze

Analyze scans all namespaces for Deployments with misconfigurations

type DeploymentInfo

type DeploymentInfo struct {
	*appsv1.Deployment
}

func (DeploymentInfo) GetPodSpec

func (d DeploymentInfo) GetPodSpec() corev1.PodSpec

type GatewayAnalyzer

type GatewayAnalyzer struct{}

func (GatewayAnalyzer) Analyze

Gateway analyser will analyse all different Kinds and search for missing object dependencies

type GatewayClassAnalyzer

type GatewayClassAnalyzer struct{}

func (GatewayClassAnalyzer) Analyze

Gateway analyser will analyse all different Kinds and search for missing object dependencies

type HTTPRouteAnalyzer

type HTTPRouteAnalyzer struct{}

func (HTTPRouteAnalyzer) Analyze

Gateway analyser will analyse all different Kinds and search for missing object dependencies

type HpaAnalyzer

type HpaAnalyzer struct{}

func (HpaAnalyzer) Analyze

func (HpaAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type IngressAnalyzer

type IngressAnalyzer struct{}

func (IngressAnalyzer) Analyze

type LogAnalyzer

type LogAnalyzer struct {
}

func (LogAnalyzer) Analyze

func (LogAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type MutatingWebhookAnalyzer

type MutatingWebhookAnalyzer struct{}

func (MutatingWebhookAnalyzer) Analyze

type NetworkPolicyAnalyzer

type NetworkPolicyAnalyzer struct{}

func (NetworkPolicyAnalyzer) Analyze

type NodeAnalyzer

type NodeAnalyzer struct{}

func (NodeAnalyzer) Analyze

func (NodeAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type PdbAnalyzer

type PdbAnalyzer struct{}

func (PdbAnalyzer) Analyze

func (PdbAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type PodAnalyzer

type PodAnalyzer struct {
}

func (PodAnalyzer) Analyze

func (PodAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type PodInfo

type PodInfo interface {
	GetPodSpec() corev1.PodSpec
}

type PvcAnalyzer

type PvcAnalyzer struct{}

func (PvcAnalyzer) Analyze

func (PvcAnalyzer) Analyze(a common.Analyzer) ([]common.Result, error)

type ReplicaSetAnalyzer

type ReplicaSetAnalyzer struct{}

func (ReplicaSetAnalyzer) Analyze

type ReplicaSetInfo

type ReplicaSetInfo struct {
	*appsv1.ReplicaSet
}

define a structure for ReplicaSet

func (ReplicaSetInfo) GetPodSpec

func (rs ReplicaSetInfo) GetPodSpec() corev1.PodSpec

type ReplicationControllerInfo

type ReplicationControllerInfo struct {
	*corev1.ReplicationController
}

define a structure for ReplicationController

func (ReplicationControllerInfo) GetPodSpec

func (rc ReplicationControllerInfo) GetPodSpec() corev1.PodSpec

type ServiceAnalyzer

type ServiceAnalyzer struct{}

func (ServiceAnalyzer) Analyze

type StatefulSetAnalyzer

type StatefulSetAnalyzer struct{}

func (StatefulSetAnalyzer) Analyze

type StatefulSetInfo

type StatefulSetInfo struct {
	*appsv1.StatefulSet
}

define a structure for StatefulSet

func (StatefulSetInfo) GetPodSpec

func (ss StatefulSetInfo) GetPodSpec() corev1.PodSpec

implement PodInfo for StatefulSetInfo

type ValidatingWebhookAnalyzer

type ValidatingWebhookAnalyzer struct{}

func (ValidatingWebhookAnalyzer) Analyze

Jump to

Keyboard shortcuts

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