kubernetes

package
v0.29.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = SDConfig{
	HTTPClientConfig: config.DefaultHTTPClientConfig,
}

DefaultConfig holds defaults for SDConfig. (copied from prometheus)

Functions

This section is empty.

Types

type NamespaceDiscovery

type NamespaceDiscovery struct {
	IncludeOwnNamespace bool     `river:"own_namespace,attr,optional"`
	Names               []string `river:"names,attr,optional"`
}

NamespaceDiscovery mirroring prometheus type

type SDConfig

type SDConfig struct {
	APIServer          config.URL              `river:"api_server,attr,optional"`
	Role               string                  `river:"role,attr"`
	KubeConfig         string                  `river:"kubeconfig_file,attr,optional"`
	HTTPClientConfig   config.HTTPClientConfig `river:"http_client_config,block,optional"`
	NamespaceDiscovery NamespaceDiscovery      `river:"namespaces,block,optional"`
	Selectors          []SelectorConfig        `river:"selectors,block,optional"`
}

SDConfig is a conversion of discover/kubernetes/SDConfig to be compatible with flow

func (*SDConfig) Convert

func (sd *SDConfig) Convert() *promk8s.SDConfig

Convert to prometheus config type

func (*SDConfig) UnmarshalRiver

func (sd *SDConfig) UnmarshalRiver(f func(interface{}) error) error

UnmarshalRiver simply applies defaults then unmarshals regularly

type SelectorConfig

type SelectorConfig struct {
	Role  string `river:"role,attr"`
	Label string `river:"label,attr,optional"`
	Field string `river:"field,attr,optional"`
}

SelectorConfig mirroring prometheus type

Jump to

Keyboard shortcuts

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