admission

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 1

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 control for: 1. PrometheusRules (validation, mutation) - ensuring created resources can be loaded by Prometheus 2. monitoringv1alpha1.AlertmanagerConfig (validation) - ensuring.

func New

func New(logger *slog.Logger, validationScheme model.ValidationScheme) *Admission

func (*Admission) Register

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

type PrometheusRules

type PrometheusRules struct {
	// TypeMeta defines the versioned schema of this representation of an object.
	metav1.TypeMeta `json:",inline"`
	// metadata defines ObjectMeta as the metadata that all persisted resources.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// spec defines the 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

type Rule struct {
	// labels defines labels to be added to rules.
	Labels map[string]any `json:"labels,omitempty"`
	// annotations defines annotations to add to each alert.
	Annotations map[string]any `json:"annotations,omitempty"`
}

type RuleGroup

type RuleGroup struct {
	// rules defines alerting rules.
	Rules []Rule `json:"rules"`
}

type RuleGroups

type RuleGroups struct {
	// groups defines alerting rules groups.
	Groups []RuleGroup `json:"groups"`
}

Jump to

Keyboard shortcuts

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