metrics

package
v0.0.0-...-02af8a4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 16 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(ca string) error

DumpCA writes the root certificate bundle which is used to verify client certificates on incoming requests to 'authCAFile' file.

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, tlsKey and authCAFile for changes. If a change happens to both tlsCert and tlsKey or authCAFile, 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 {
}

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