kubernetes

package
v0.34.0 Latest Latest
Warning

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

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

Documentation

Overview

Package kubernetes implements a discovery.kubernetes component.

Index

Constants

This section is empty.

Variables

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

DefaultConfig holds defaults for SDConfig.

Functions

func New

New returns a new instance of a discovery.kubernetes component.

Types

type Arguments added in v0.30.0

type Arguments 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:",squash"`
	NamespaceDiscovery NamespaceDiscovery      `river:"namespaces,block,optional"`
	Selectors          []SelectorConfig        `river:"selectors,block,optional"`
	AttachMetadata     AttachMetadataConfig    `river:"attach_metadata,block,optional"`
}

Arguments configures the discovery.kubernetes component.

func (*Arguments) Convert added in v0.30.0

func (args *Arguments) Convert() *promk8s.SDConfig

Convert converts Arguments to the Prometheus SD type.

func (*Arguments) UnmarshalRiver added in v0.30.0

func (args *Arguments) UnmarshalRiver(f func(interface{}) error) error

UnmarshalRiver implements river.Unmarshaler and applies default settings.

type AttachMetadataConfig added in v0.34.0

type AttachMetadataConfig struct {
	Node bool `river:"node,attr,optional"`
}

type NamespaceDiscovery

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

NamespaceDiscovery configures filtering rules for which namespaces to discover.

type SelectorConfig

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

SelectorConfig configures selectors to filter resources to discover.

Jump to

Keyboard shortcuts

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