gke

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service contains necessary data for service discovery in GKE.

func MustNewService

func MustNewService(project string) *Service

MustNewService creates a new GKE service discovery instance. The function exits if an error occurs during setup.

func (*Service) Discover

func (s *Service) Discover(ctx context.Context) ([]discovery.StaticConfig, error)

Discover 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

Directories

Path Synopsis
Package iface defines an interface for accessing Google Compute & Container APIs, and helps mediate access to k8s clients.
Package iface defines an interface for accessing Google Compute & Container APIs, and helps mediate access to k8s clients.

Jump to

Keyboard shortcuts

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