kubernetes

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 5 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

func New(opts component.Options, args Arguments) (*discovery.Component, error)

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

Types

type Arguments

type Arguments struct {
	APIServer          config.URL              `alloy:"api_server,attr,optional"`
	Role               string                  `alloy:"role,attr"`
	KubeConfig         string                  `alloy:"kubeconfig_file,attr,optional"`
	HTTPClientConfig   config.HTTPClientConfig `alloy:",squash"`
	NamespaceDiscovery NamespaceDiscovery      `alloy:"namespaces,block,optional"`
	Selectors          []SelectorConfig        `alloy:"selectors,block,optional"`
	AttachMetadata     AttachMetadataConfig    `alloy:"attach_metadata,block,optional"`
}

Arguments configures the discovery.kubernetes component.

func (*Arguments) Convert

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

Convert converts Arguments to the Prometheus SD type.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements syntax.Validator.

type AttachMetadataConfig

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

type NamespaceDiscovery

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

NamespaceDiscovery configures filtering rules for which namespaces to discover.

type SelectorConfig

type SelectorConfig struct {
	Role  string `alloy:"role,attr"`
	Label string `alloy:"label,attr,optional"`
	Field string `alloy:"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