gke

package
v0.0.0-...-6a078a0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

gke implements service discovery for GKE clusters with k8s services annotated for federation scraping.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory stores information needed to create new Source instances.

func NewSourceFactory

func NewSourceFactory(project, filename string) *Factory

NewSourceFactory returns a new Factory object that can create new GKE Sources.

func (*Factory) Create

func (f *Factory) Create() (discovery.Source, error)

Create returns a discovery.Source initialized with authenticated clients for Compute & Container APIs, ready for Collection.

type Source

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

Source caches information collected from the GCE, GKE, and K8S APIs during target discovery.

func (*Source) Collect

func (source *Source) Collect() error

Collect uses the Compute Engine, Container Engine, and Kubernetes APIs to check every GCE zone for Container Engine (gke) clusters, and checks each cluster for services annotated for federated scraping.

Collect returns every gke cluster with a k8s service annotation that equals:

gke-prometheus-federation/scrape: true

func (*Source) Save

func (source *Source) Save() error

Saves collected targets to the given filename.

Jump to

Keyboard shortcuts

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