analyzer

package
v0.3.16 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 17 Imported by: 4

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 added in v0.2.2

func CheckCronScheduleIsValid(schedule string) (bool, error)

Check CRON schedule format

func FetchLatestEvent added in v0.1.7

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

func GetAnalyzerMap added in v0.2.0

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

func ListFilters added in v0.1.5

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

Types

type CronJobAnalyzer added in v0.2.2

type CronJobAnalyzer struct{}

func (CronJobAnalyzer) Analyze added in v0.2.2

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

type DeploymentAnalyzer added in v0.2.2

type DeploymentAnalyzer struct {
}

DeploymentAnalyzer is an analyzer that checks for misconfigured Deployments

func (DeploymentAnalyzer) Analyze added in v0.2.2

Analyze scans all namespaces for Deployments with misconfigurations

type DeploymentInfo added in v0.2.4

type DeploymentInfo struct {
	*appsv1.Deployment
}

func (DeploymentInfo) GetPodSpec added in v0.2.4

func (d DeploymentInfo) GetPodSpec() corev1.PodSpec

type HpaAnalyzer added in v0.1.8

type HpaAnalyzer struct{}

func (HpaAnalyzer) Analyze added in v0.2.0

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

type IngressAnalyzer added in v0.1.8

type IngressAnalyzer struct{}

func (IngressAnalyzer) Analyze added in v0.2.0

type MutatingWebhookAnalyzer added in v0.3.10

type MutatingWebhookAnalyzer struct{}

func (MutatingWebhookAnalyzer) Analyze added in v0.3.10

type NetworkPolicyAnalyzer added in v0.2.2

type NetworkPolicyAnalyzer struct{}

func (NetworkPolicyAnalyzer) Analyze added in v0.2.2

type NodeAnalyzer added in v0.2.3

type NodeAnalyzer struct{}

func (NodeAnalyzer) Analyze added in v0.2.3

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

type PdbAnalyzer added in v0.1.8

type PdbAnalyzer struct{}

func (PdbAnalyzer) Analyze added in v0.2.0

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

type PodAnalyzer added in v0.1.8

type PodAnalyzer struct {
}

func (PodAnalyzer) Analyze added in v0.2.0

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

type PodInfo added in v0.2.4

type PodInfo interface {
	GetPodSpec() corev1.PodSpec
}

type PvcAnalyzer added in v0.1.8

type PvcAnalyzer struct{}

func (PvcAnalyzer) Analyze added in v0.2.0

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

type ReplicaSetAnalyzer added in v0.1.8

type ReplicaSetAnalyzer struct{}

func (ReplicaSetAnalyzer) Analyze added in v0.2.0

type ReplicaSetInfo added in v0.2.4

type ReplicaSetInfo struct {
	*appsv1.ReplicaSet
}

define a structure for ReplicaSet

func (ReplicaSetInfo) GetPodSpec added in v0.2.4

func (rs ReplicaSetInfo) GetPodSpec() corev1.PodSpec

type ReplicationControllerInfo added in v0.2.4

type ReplicationControllerInfo struct {
	*corev1.ReplicationController
}

define a structure for ReplicationController

func (ReplicationControllerInfo) GetPodSpec added in v0.2.4

func (rc ReplicationControllerInfo) GetPodSpec() corev1.PodSpec

type ServiceAnalyzer added in v0.1.8

type ServiceAnalyzer struct{}

func (ServiceAnalyzer) Analyze added in v0.2.0

type StatefulSetAnalyzer added in v0.2.1

type StatefulSetAnalyzer struct{}

func (StatefulSetAnalyzer) Analyze added in v0.2.1

type StatefulSetInfo added in v0.2.4

type StatefulSetInfo struct {
	*appsv1.StatefulSet
}

define a structure for StatefulSet

func (StatefulSetInfo) GetPodSpec added in v0.2.4

func (ss StatefulSetInfo) GetPodSpec() corev1.PodSpec

implement PodInfo for StatefulSetInfo

type ValidatingWebhookAnalyzer added in v0.3.10

type ValidatingWebhookAnalyzer struct{}

func (ValidatingWebhookAnalyzer) Analyze added in v0.3.10

Jump to

Keyboard shortcuts

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