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: 0

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