operator

package
v0.97.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectorResource       = "OpenTelemetryCollector"
	ResourceIdentifierKey   = "created-by"
	ResourceIdentifierValue = "operator-opamp-bridge"
	ReportingLabelKey       = "opentelemetry.io/opamp-reporting"
	ManagedLabelKey         = "opentelemetry.io/opamp-managed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(name string, log logr.Logger, c client.Client, componentsAllowed map[string]map[string]bool) *Client

func (Client) Apply

func (c Client) Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error

func (Client) Delete

func (c Client) Delete(name string, namespace string) error

func (Client) GetCollectorPods

func (c Client) GetCollectorPods(selectorLabels map[string]string, namespace string) (*v1.PodList, error)

func (Client) GetInstance

func (c Client) GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error)

func (Client) ListInstances

func (c Client) ListInstances() ([]v1alpha1.OpenTelemetryCollector, error)

type ConfigApplier

type ConfigApplier interface {
	// Apply receives a name and namespace to apply an OpenTelemetryCollector CRD that is contained in the configmap.
	Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error

	// GetInstance retrieves an OpenTelemetryCollector CRD given a name and namespace.
	GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error)

	// GetCollectorPods retrieves all pods that match the given collector's selector labels and namespace.
	GetCollectorPods(selectorLabels map[string]string, namespace string) (*v1.PodList, error)

	// ListInstances retrieves all OpenTelemetryCollector CRDs created by the operator-opamp-bridge agent.
	ListInstances() ([]v1alpha1.OpenTelemetryCollector, error)

	// Delete attempts to delete an OpenTelemetryCollector object given a name and namespace.
	Delete(name string, namespace string) error
}

Jump to

Keyboard shortcuts

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