metrics

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger added in v1.7.0

func Logger() logr.Logger

Types

type PolicyBackgroundMode

type PolicyBackgroundMode string
const (
	BackgroundTrue  PolicyBackgroundMode = "true"
	BackgroundFalse PolicyBackgroundMode = "false"
)

func ParsePolicyBackgroundMode

func ParsePolicyBackgroundMode(policy kyverno.PolicyInterface) PolicyBackgroundMode

type PolicyType

type PolicyType string
const (
	Cluster    PolicyType = "cluster"
	Namespaced PolicyType = "namespaced"
)

type PolicyValidationMode

type PolicyValidationMode string
const (
	Enforce PolicyValidationMode = "enforce"
	Audit   PolicyValidationMode = "audit"
)

func ParsePolicyValidationMode

func ParsePolicyValidationMode(validationFailureAction kyverno.ValidationFailureAction) (PolicyValidationMode, error)

type PromConfig

type PromConfig struct {
	MetricsRegistry *prom.Registry
	Metrics         *PromMetrics
	Config          *config.MetricsConfigData
	// contains filtered or unexported fields
}

func NewPromConfig

func NewPromConfig(metricsConfigData *config.MetricsConfigData) (*PromConfig, error)

type PromMetrics

type PromMetrics struct {
	PolicyResults           *prom.CounterVec
	PolicyRuleInfo          *prom.GaugeVec
	PolicyChanges           *prom.CounterVec
	PolicyExecutionDuration *prom.HistogramVec
	AdmissionReviewDuration *prom.HistogramVec
	AdmissionRequests       *prom.CounterVec
}

type ResourceRequestOperation

type ResourceRequestOperation string
const (
	ResourceCreated   ResourceRequestOperation = "create"
	ResourceUpdated   ResourceRequestOperation = "update"
	ResourceDeleted   ResourceRequestOperation = "delete"
	ResourceConnected ResourceRequestOperation = "connect"
)

func ParseResourceRequestOperation added in v1.7.0

func ParseResourceRequestOperation(requestOperationStr string) (ResourceRequestOperation, error)

type RuleExecutionCause

type RuleExecutionCause string
const (
	AdmissionRequest RuleExecutionCause = "admission_request"
	BackgroundScan   RuleExecutionCause = "background_scan"
)

type RuleResult

type RuleResult string
const (
	Pass  RuleResult = "pass"
	Fail  RuleResult = "fail"
	Warn  RuleResult = "warn"
	Error RuleResult = "error"
	Skip  RuleResult = "skip"
)

type RuleType

type RuleType string
const (
	Validate      RuleType = "validate"
	Mutate        RuleType = "mutate"
	Generate      RuleType = "generate"
	EmptyRuleType RuleType = "-"
)

func ParseRuleType

func ParseRuleType(rule kyverno.Rule) RuleType

func ParseRuleTypeFromEngineRuleResponse added in v1.7.0

func ParseRuleTypeFromEngineRuleResponse(rule response.RuleResponse) RuleType

Jump to

Keyboard shortcuts

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