admission

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admission

type Admission struct {
	// contains filtered or unexported fields
}

Admission is a validating and mutating webhook that ensures PrometheusRules pushed into the cluster will be valid when loaded by a Prometheus

func New

func New(logger log.Logger) *Admission

func (*Admission) Register

func (a *Admission) Register(mux *http.ServeMux)

func (*Admission) RegisterMetrics

func (a *Admission) RegisterMetrics(validationTriggeredCounter, validationErrorsCounter *prometheus.Counter)

type PrometheusRules

type PrometheusRules struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object’s metadata. More info:
	// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of desired alerting rule definitions for Prometheus.
	Spec runtime.RawExtension `json:"spec"`
}

PrometheusRules is used to separate the PrometheusRules CRD wrapper from the underlying Prometheus rules

type Rule added in v0.40.0

type Rule struct {
	Labels      map[string]interface{} `json:"labels,omitempty"`
	Annotations map[string]interface{} `json:"annotations,omitempty"`
}

type RuleGroup added in v0.40.0

type RuleGroup struct {
	Rules []Rule `json:"rules"`
}

type RuleGroups added in v0.40.0

type RuleGroups struct {
	Groups []RuleGroup `json:"groups"`
}

Jump to

Keyboard shortcuts

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