metrics

package
v0.0.0-...-d24467f Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthConfigMapNamespace   = "kube-system"
	AuthConfigMapName        = "extension-apiserver-authentication"
	AuthConfigMapClientCAKey = "client-ca-file"
)
View Source
const (

	// MetricsPort is the IP port supplied to the HTTP server used for Prometheus,
	// and matches what is specified in the corresponding Service and ServiceMonitor.
	MetricsPort = 60000
)

When adding metric names, see https://prometheus.io/docs/practices/naming/#metric-names

Variables

This section is empty.

Functions

func Degraded

func Degraded(deg bool)

Degraded sets the metric that indicates whether the operator is in degraded mode or not.

func DumpCA

func DumpCA(caBundle string)

DumpCA stores the root certificate bundle which is used to verify metric server client certificates. It uses an unbuffered channel to store the data and it it does so only if the CA bundle changed from the current CA bundle on record.

func PodLabelsUsed

func PodLabelsUsed(enable bool)

PodLabelsUsed indicates whether the deprecated Pod label matching functionality is turned on.

func ProfileCalculated

func ProfileCalculated(nodeName, profileName string)

ProfileCalculated keeps track of the number of times a given Tuned profile resource was calculated for node 'nodeName'.

func RegisterVersion

func RegisterVersion(version string)

RegisterVersion exposes the Operator build version.

func RunServer

func RunServer(port int, ctx context.Context) error

RunServer starts the server, and watches the tlsCert and tlsKey for changes. If a change happens to both tlsCert and tlsKey, the metrics server is rebuilt and restarted with the current files. Every non-nil return from this function is fatal and will restart the whole operator.

Types

type Server

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

func (Server) Start

func (Server) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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