Documentation ¶
Overview ¶
Package opa provides prometheus metrics for OPA and methods
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportConstraintInformation ¶
func ExportConstraintInformation(ci *prometheus.Desc, constraints []Constraint) []prometheus.Metric
func ExportViolations ¶
func ExportViolations(cv *prometheus.Desc, constraints []Constraint) []prometheus.Metric
Types ¶
type Constraint ¶
type Constraint struct { Meta ConstraintMeta Spec ConstraintSpec Status ConstraintStatus }
func GetConstraints ¶
func GetConstraints(inCluster *bool) ([]Constraint, error)
GetConstraints returns a list of all OPA constraints nolint:gocognit,gocyclo // would be nice to reduce complexity - I don't see a straightforward path ATM.
type ConstraintMeta ¶
ConstraintMeta represents meta information of a constraint
type ConstraintSpec ¶
type ConstraintSpec struct {
EnforcementAction string `json:"enforcementAction"`
}
ConstraintSpec collect general information about the overall constraints applied to the cluster
type ConstraintStatus ¶
type Exporter ¶
type Exporter struct { ConstraintInformation *prometheus.Desc ConstraintViolation *prometheus.Desc Metrics []prometheus.Metric Namespace string Up *prometheus.Desc }
func NewExporter ¶
func (*Exporter) Collect ¶
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
func (*Exporter) Describe ¶
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Click to show internal directories.
Click to hide internal directories.