operator

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AgentCompatibilityMatrix = []string{
		"v0.14.0",
	}

	DefaultAgentVersion   = AgentCompatibilityMatrix[len(AgentCompatibilityMatrix)-1]
	DefaultAgentBaseImage = "grafana/agent"
	DefaultAgentImage     = DefaultAgentBaseImage + ":" + DefaultAgentVersion
)

Supported versions of the Grafana Agent.

Functions

func New

func New(l log.Logger, c *Config, m manager.Manager) error

New creates a new Operator managed by a specific Manager. Start the Manager to also start the Operator.

Types

type Config

type Config struct {
	LogLevel      logging.Level
	LogFormat     logging.Format
	Labels        promop.Labels
	Controller    controller.Options
	AgentSelector string
}

Config controls the configuration of the Operator.

func NewConfig

func NewConfig(f *flag.FlagSet) (*Config, error)

NewConfig creates a new Config and initializes default values. Flags will be regsitered against f if it is non-nil.

func (*Config) Manager

func (c *Config) Manager() (manager.Manager, error)

Manager initializes the controller for this Config.

type NamespaceSelector

type NamespaceSelector = promop_v1.NamespaceSelector

NamespaceSelector re-exports the Prometheus Operator NamespaceSelector.

type ResourceSelector

type ResourceSelector struct {
	// NamespaceName matches the name of the namespace.
	NamespaceName NamespaceSelector

	// NamespaceLabels matches the labels on the namespace of the modified
	// resource.
	NamespaceLabels labels.Selector

	// Labels matches the labels on the modified resource.
	Labels labels.Selector
}

ResourceSelector is a combination of namespace and label selectors to match against an incoming resource.

Directories

Path Synopsis
apis
Package assets contains helper types used for loading in static assets when configuring the Grafana Agent.
Package assets contains helper types used for loading in static assets when configuring the Grafana Agent.
Package config generates Grafana Agent configuration based on Kubernetes resources.
Package config generates Grafana Agent configuration based on Kubernetes resources.
Package logutil implements an adaptor for the go-kit logger, which is used in the Grafana Agent project, and go-logr, which is used in controller-runtime.
Package logutil implements an adaptor for the go-kit logger, which is used in the Grafana Agent project, and go-logr, which is used in controller-runtime.

Jump to

Keyboard shortcuts

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