cluster_discovery

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSROption

type CSROption func(csr *CertificateSigningRequest)

func WithCertificateSigningRequestLogger

func WithCertificateSigningRequestLogger(log *logger.Logger) CSROption

func WithCertificateSigningRequestTimeout

func WithCertificateSigningRequestTimeout(t time.Duration) CSROption

type CertificateSigningRequest

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

func (*CertificateSigningRequest) RequestScraperCertificate

func (csr *CertificateSigningRequest) RequestScraperCertificate() ([]byte, []byte, error)

type ClusterDiscovery

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

ClusterDiscovery queries the PKS API and generates a Prometheus scrape config file for all the available clusters.

func New

func New(
	scrapeConfigStore scrapeStore,
	topologyProvider topologyProvider,
	authClient authorizationProvider,
	metricStoreAPIAddress string,
	metricStoreClient *http.Client,
	options ...WithOption,
) *ClusterDiscovery

New returns a configured ClusterDiscovery

func (*ClusterDiscovery) Run

func (discovery *ClusterDiscovery) Run()

func (*ClusterDiscovery) Start

func (discovery *ClusterDiscovery) Start()

Start runs the discovery server and periodically writes an updated prometheus config file for each of the available PKS clusters.

func (*ClusterDiscovery) Stop

func (discovery *ClusterDiscovery) Stop()

Stop shuts down the ClusterDiscovery server, leaving the scrape config file in place.

func (*ClusterDiscovery) UpdateScrapeConfig

func (discovery *ClusterDiscovery) UpdateScrapeConfig()

type ScrapeTemplate

type ScrapeTemplate struct {
	ApiServerJobName string
	ClusterName      string
	CAPath           string
	CertPath         string
	KeyPath          string
	SkipSsl          bool
	K8sApiAddr       string
	ServerName       string
	MasterIps        []string
}

type WithOption

type WithOption func(discovery *ClusterDiscovery)

func WithLogger

func WithLogger(log *logger.Logger) WithOption

func WithMetrics

func WithMetrics(metrics metrics.Registrar) WithOption

func WithRefreshInterval

func WithRefreshInterval(interval time.Duration) WithOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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