controlplane

package
v1.26.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComponentGrouper

func NewComponentGrouper(
	c client.HTTPClient,
	queries []prometheus.Query,
	logger *logrus.Logger,
	podName string,
) data.Grouper

NewComponentGrouper creates a grouper for the given control plane component podName.

Types

type Component

type Component struct {
	Skip                            bool
	SkipReason                      string
	Name                            ComponentName
	LabelValue                      string
	TLSSecretName                   string
	TLSSecretNamespace              string
	Endpoint                        url.URL
	SecureEndpoint                  url.URL
	InsecureFallback                bool
	UseServiceAccountAuthentication bool
	UseMTLSAuthentication           bool
	Specs                           definition.SpecGroups
	Queries                         []prometheus.Query
	Labels                          []labels
}

Component represents a control plane component from which the integration will fetch metrics.

func BuildComponentList

func BuildComponentList(options ...ComponentOption) []Component

BuildComponentList returns a list of components that the integration will monitor.

type ComponentName

type ComponentName string

ComponentName is a typed name for components

const (
	// Scheduler is the Kubernetes Scheduler
	Scheduler ComponentName = "scheduler"
	// Etcd is the Kubernetes etcd
	Etcd ComponentName = "etcd"
	// ControllerManager is the Kubernetes controller manager
	ControllerManager ComponentName = "controller-manager"
	// APIServer is the Kubernetes apiserver
	APIServer ComponentName = "api-server"
)

type ComponentOption

type ComponentOption func([]Component)

ComponentOption configures the list of components

func WithAPIServerSecurePort

func WithAPIServerSecurePort(port string) ComponentOption

WithAPIServerSecurePort configures the API Server component to be query using HTTPS, with the Service Account token as authentication

func WithEndpointURL

func WithEndpointURL(name ComponentName, endpointURL string) ComponentOption

WithEndpointURL configures the component to be use a specific endpoint URL and enables Service Account token as authentication

func WithEtcdTLSConfig

func WithEtcdTLSConfig(etcdTLSSecretName, etcdTLSSecretNamespace string) ComponentOption

WithEtcdTLSConfig configures the etcd component to use (M)TLS using credentials stored in a secret. The secret should contains the following fields: "cert": the client certificate "key": the client's private key "cacert": optional, the cacert of the ETCD server. If omitted, insecureSkipVerify should be set to "true" "insecureSkipVerify": optional, if set to "true", ETCD's server certificate will not be verified

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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