kubernetes

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIServer  string         `yaml:"api_server"` // TODO: not used
	Namespaces []string       `yaml:"namespaces"`
	Pod        *PodConfig     `yaml:"pod"`
	Service    *ServiceConfig `yaml:"service"`
}

type KubeDiscoverer added in v0.57.0

type KubeDiscoverer struct {
	*logger.Logger
	// contains filtered or unexported fields
}

func NewKubeDiscoverer added in v0.57.0

func NewKubeDiscoverer(cfg Config) (*KubeDiscoverer, error)

func (*KubeDiscoverer) Discover added in v0.57.0

func (d *KubeDiscoverer) Discover(ctx context.Context, in chan<- []model.TargetGroup)

func (*KubeDiscoverer) String added in v0.57.0

func (d *KubeDiscoverer) String() string

type PodConfig added in v0.57.0

type PodConfig struct {
	Tags      string `yaml:"tags"`
	LocalMode bool   `yaml:"local_mode"`
	Selector  struct {
		Label string `yaml:"label"`
		Field string `yaml:"field"`
	} `yaml:"selector"`
}

type PodTarget

type PodTarget struct {
	model.Base `hash:"ignore"`

	Address        string
	Namespace      string
	Name           string
	Annotations    map[string]any
	Labels         map[string]any
	NodeName       string
	PodIP          string
	ControllerName string
	ControllerKind string
	ContName       string
	Image          string
	Env            map[string]any
	Port           string
	PortName       string
	PortProtocol   string
	// contains filtered or unexported fields
}

func (PodTarget) Hash

func (p PodTarget) Hash() uint64

func (PodTarget) TUID

func (p PodTarget) TUID() string

type ServiceConfig added in v0.57.0

type ServiceConfig struct {
	Tags     string `yaml:"tags"`
	Selector struct {
		Label string `yaml:"label"`
		Field string `yaml:"field"`
	} `yaml:"selector"`
}

type ServiceTarget

type ServiceTarget struct {
	model.Base `hash:"ignore"`

	Address      string
	Namespace    string
	Name         string
	Annotations  map[string]any
	Labels       map[string]any
	Port         string
	PortName     string
	PortProtocol string
	ClusterIP    string
	ExternalName string
	Type         string
	// contains filtered or unexported fields
}

func (ServiceTarget) Hash

func (s ServiceTarget) Hash() uint64

func (ServiceTarget) TUID

func (s ServiceTarget) TUID() string

Jump to

Keyboard shortcuts

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