prometheus

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrometheusService

func GetPrometheusService(clientset kubernetes.Interface) (*v1.Service, bool, error)

returns the prometheus service name

func QueryPrometheus

func QueryPrometheus(
	clientset kubernetes.Interface,
	service *v1.Service,
	opts *QueryOpts,
) ([]*promParsedSingletonQuery, error)

Types

type QueryOpts

type QueryOpts struct {
	Metric     string   `schema:"metric"`
	ShouldSum  bool     `schema:"shouldsum"`
	Kind       string   `schema:"kind"`
	PodList    []string `schema:"pods"`
	Name       string   `schema:"name"`
	Namespace  string   `schema:"namespace"`
	StartRange uint     `schema:"startrange"`
	EndRange   uint     `schema:"endrange"`
	Resolution string   `schema:"resolution"`
	Percentile float64  `schema:"percentile"`
}

type SimpleIngress

type SimpleIngress struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

func GetIngressesWithNGINXAnnotation

func GetIngressesWithNGINXAnnotation(clientset kubernetes.Interface) ([]SimpleIngress, error)

GetIngressesWithNGINXAnnotation gets an array of names for all ingresses controlled by NGINX

Jump to

Keyboard shortcuts

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