Documentation ¶
Index ¶
- Variables
- func CalculateScore(fmResultss []kubeeyev1alpha2.ResourceResult, k8sResources kube.K8SResource) (scoreInfo kubeeyev1alpha2.ScoreInfo)
- func GetCpu(fs procfs.FS) map[string]interface{}
- func GetFileSystem(p string) map[string]interface{}
- func GetInodes(p string) map[string]interface{}
- func GetInspectComponent(ctx context.Context, clients *kube.KubernetesClient, ...) ([]corev1.Service, error)
- func GetLoadAvg(fs procfs.FS) map[string]interface{}
- func GetMemory(fs procfs.FS) map[string]interface{}
- func JobInspect(ctx context.Context, taskName string, resultName string, ...) error
- func MergeRegoRulesValidate(ctx context.Context, regoRulesChan []string, vfuncs ...validateFunc) <-chan []v1alpha2.ResourceResult
- func RegoRulesValidate(queryRule string, Resources kube.K8SResource, auditPercent *PercentOutput) validateFunc
- func VailOpaRulesResult(ctx context.Context, k8sResources kube.K8SResource, RegoRules []string) v1alpha2.KubeeyeOpaResult
- type OpaInspect
- func (o *OpaInspect) CreateJobTask(ctx context.Context, clients *kube.KubernetesClient, ...) (*kubeeyev1alpha2.JobPhase, error)
- func (o *OpaInspect) GetResult(runNodeName string, resultCm *corev1.ConfigMap, ...) (*kubeeyev1alpha2.InspectResult, error)
- func (o *OpaInspect) RunInspect(ctx context.Context, rules []kubeeyev1alpha2.JobRule, ...) ([]byte, error)
- type OutputType
- type PercentOutput
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 GetFileSystem ¶
func GetInspectComponent ¶
func GetInspectComponent(ctx context.Context, clients *kube.KubernetesClient, components *kubeeyev1alpha2.ComponentRule) ([]corev1.Service, error)
func GetLoadAvg ¶
func JobInspect ¶
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) CreateJobTask ¶
func (o *OpaInspect) CreateJobTask(ctx context.Context, clients *kube.KubernetesClient, jobRule *kubeeyev1alpha2.JobRule, task *kubeeyev1alpha2.InspectTask, config *conf.JobConfig) (*kubeeyev1alpha2.JobPhase, error)
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, ownerRef ...metav1.OwnerReference) ([]byte, error)
type OutputType ¶
type OutputType string
type PercentOutput ¶
Click to show internal directories.
Click to hide internal directories.