inspect

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RuleOperatorMap = make(map[string]options.InspectInterface)

Functions

func CalculateScore

func CalculateScore(fmResultss []kubeeyev1alpha2.ResourceResult, k8sResources kube.K8SResource) (scoreInfo kubeeyev1alpha2.ScoreInfo)

func GetCpu

func GetCpu(fs procfs.FS) map[string]interface{}

func GetFileSystem

func GetFileSystem(p string) map[string]interface{}

func GetInodes

func GetInodes(p string) map[string]interface{}

func GetLoadAvg

func GetLoadAvg(fs procfs.FS) map[string]interface{}

func GetMemory

func GetMemory(fs procfs.FS) map[string]interface{}

func GetNameSpacesForWorkSpace

func GetNameSpacesForWorkSpace(ctx context.Context, clients *kube.KubernetesClient, workspace string) []corev1.Namespace

func GetServices

func GetServices(services []corev1.Service, name string) (corev1.Service, bool)

func GetServicesForNameSpace

func GetServicesForNameSpace(services []corev1.Service, namespace string) []corev1.Service

func MergeRegoRulesValidate

func MergeRegoRulesValidate(ctx context.Context, regoRulesChan []string, vfuncs ...validateFunc) <-chan []v1alpha2.ResourceResult

MergeRegoRulesValidate Validate kubernetes cluster Resources, put the results into channels.

func RegoRulesValidate

func RegoRulesValidate(queryRule string, Resources kube.K8SResource, auditPercent *PercentOutput) validateFunc

func VailOpaRulesResult

func VailOpaRulesResult(ctx context.Context, k8sResources kube.K8SResource, RegoRules []string) v1alpha2.KubeeyeOpaResult

Types

type OpaInspect

type OpaInspect struct {
}

func (*OpaInspect) GetResult

func (o *OpaInspect) GetResult(runNodeName string, resultCm *corev1.ConfigMap, resultCr *kubeeyev1alpha2.InspectResult) (*kubeeyev1alpha2.InspectResult, error)

func (*OpaInspect) RunInspect

func (o *OpaInspect) RunInspect(ctx context.Context, rules []kubeeyev1alpha2.JobRule, clients *kube.KubernetesClient, currentJobName string, informers informers.SharedInformerFactory, ownerRef ...metav1.OwnerReference) ([]byte, error)

type OutputType

type OutputType string

type PercentOutput

type PercentOutput struct {
	TotalAuditCount   int
	CurrentAuditCount int
	AuditPercent      int
}

Jump to

Keyboard shortcuts

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