v1alpha1

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 11 Imported by: 9

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group. +kubebuilder:object:generate=true +groupName=opentelemetry.io

Index

Constants

View Source
const (
	AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// Endpoint is address of the collector with OTLP endpoint.
	// +optional
	Endpoint string `json:"endpoint,omitempty"`
}

Exporter defines OTLP exporter configuration.

func (*Exporter) DeepCopy

func (in *Exporter) DeepCopy() *Exporter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter.

func (*Exporter) DeepCopyInto

func (in *Exporter) DeepCopyInto(out *Exporter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Instrumentation

type Instrumentation struct {
	Status            InstrumentationStatus `json:"status,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              InstrumentationSpec `json:"spec,omitempty"`
	metav1.TypeMeta   `json:",inline"`
}

Instrumentation is the spec for OpenTelemetry instrumentation.

func (*Instrumentation) DeepCopy

func (in *Instrumentation) DeepCopy() *Instrumentation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation.

func (*Instrumentation) DeepCopyInto

func (in *Instrumentation) DeepCopyInto(out *Instrumentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Instrumentation) DeepCopyObject

func (in *Instrumentation) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Instrumentation) Default

func (r *Instrumentation) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*Instrumentation) SetupWebhookWithManager

func (r *Instrumentation) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Instrumentation) ValidateCreate

func (in *Instrumentation) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*Instrumentation) ValidateDelete

func (in *Instrumentation) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*Instrumentation) ValidateUpdate

func (in *Instrumentation) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type InstrumentationList

type InstrumentationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Instrumentation `json:"items"`
}

InstrumentationList contains a list of Instrumentation.

func (*InstrumentationList) DeepCopy

func (in *InstrumentationList) DeepCopy() *InstrumentationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationList.

func (*InstrumentationList) DeepCopyInto

func (in *InstrumentationList) DeepCopyInto(out *InstrumentationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InstrumentationList) DeepCopyObject

func (in *InstrumentationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type InstrumentationSpec

type InstrumentationSpec struct {
	// Exporter defines exporter configuration.
	// +optional
	Exporter `json:"exporter,omitempty"`

	// Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification.
	// +optional
	Resource Resource `json:"resource,omitempty"`

	// Propagators defines inter-process context propagation configuration.
	// +optional
	Propagators []Propagator `json:"propagators,omitempty"`

	// Sampler defines sampling configuration.
	// +optional
	Sampler `json:"sampler,omitempty"`

	// Java defines configuration for java auto-instrumentation.
	// +optional
	Java Java `json:"java,omitempty"`

	// NodeJS defines configuration for nodejs auto-instrumentation.
	// +optional
	NodeJS NodeJS `json:"nodejs,omitempty"`

	// Python defines configuration for python auto-instrumentation.
	// +optional
	Python Python `json:"python,omitempty"`
}

InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation.

func (*InstrumentationSpec) DeepCopy

func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec.

func (*InstrumentationSpec) DeepCopyInto

func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InstrumentationStatus

type InstrumentationStatus struct {
}

InstrumentationStatus defines status of the instrumentation.

func (*InstrumentationStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationStatus.

func (*InstrumentationStatus) DeepCopyInto

func (in *InstrumentationStatus) DeepCopyInto(out *InstrumentationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Java

type Java struct {
	// Image is a container image with javaagent auto-instrumentation JAR.
	// +optional
	Image string `json:"image,omitempty"`
}

Java defines Java SDK and instrumentation configuration.

func (*Java) DeepCopy

func (in *Java) DeepCopy() *Java

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Java.

func (*Java) DeepCopyInto

func (in *Java) DeepCopyInto(out *Java)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Mode

type Mode string

Mode represents how the collector should be deployed (deployment vs. daemonset) +kubebuilder:validation:Enum=daemonset;deployment;sidecar;statefulset

const (
	// ModeDaemonSet specifies that the collector should be deployed as a Kubernetes DaemonSet.
	ModeDaemonSet Mode = "daemonset"

	// ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment.
	ModeDeployment Mode = "deployment"

	// ModeSidecar specifies that the collector should be deployed as a sidecar to pods.
	ModeSidecar Mode = "sidecar"

	// ModeStatefulSet specifies that the collector should be deployed as a Kubernetes StatefulSet.
	ModeStatefulSet Mode = "statefulset"
)

type NodeJS

type NodeJS struct {
	// Image is a container image with NodeJS SDK and auto-instrumentation.
	// +optional
	Image string `json:"image,omitempty"`
}

NodeJS defines NodeJS SDK and instrumentation configuration.

func (*NodeJS) DeepCopy

func (in *NodeJS) DeepCopy() *NodeJS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJS.

func (*NodeJS) DeepCopyInto

func (in *NodeJS) DeepCopyInto(out *NodeJS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpenTelemetryCollector

type OpenTelemetryCollector struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   OpenTelemetryCollectorSpec   `json:"spec,omitempty"`
	Status OpenTelemetryCollectorStatus `json:"status,omitempty"`
}

OpenTelemetryCollector is the Schema for the opentelemetrycollectors API.

func (*OpenTelemetryCollector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector.

func (*OpenTelemetryCollector) DeepCopyInto

func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpenTelemetryCollector) DeepCopyObject

func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*OpenTelemetryCollector) Default

func (r *OpenTelemetryCollector) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type.

func (*OpenTelemetryCollector) SetupWebhookWithManager

func (r *OpenTelemetryCollector) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*OpenTelemetryCollector) ValidateCreate

func (r *OpenTelemetryCollector) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*OpenTelemetryCollector) ValidateDelete

func (r *OpenTelemetryCollector) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*OpenTelemetryCollector) ValidateUpdate

func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type OpenTelemetryCollectorList

type OpenTelemetryCollectorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []OpenTelemetryCollector `json:"items"`
}

OpenTelemetryCollectorList contains a list of OpenTelemetryCollector.

func (*OpenTelemetryCollectorList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorList.

func (*OpenTelemetryCollectorList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpenTelemetryCollectorList) DeepCopyObject

func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type OpenTelemetryCollectorSpec

type OpenTelemetryCollectorSpec struct {
	// Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.
	// +required
	Config string `json:"config,omitempty"`

	// Args is the set of arguments to pass to the OpenTelemetry Collector binary
	// +optional
	Args map[string]string `json:"args,omitempty"`

	// Replicas is the number of pod instances for the underlying OpenTelemetry Collector
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
	// +optional
	ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// Image indicates the container image to use for the OpenTelemetry Collector.
	// +optional
	Image string `json:"image,omitempty"`

	// TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not.
	// +optional
	TargetAllocator OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"`

	// Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar)
	// +optional
	Mode Mode `json:"mode,omitempty"`

	// ServiceAccount indicates the name of an existing service account to use with this instance.
	// +optional
	ServiceAccount string `json:"serviceAccount,omitempty"`

	// SecurityContext will be set as the container security context.
	// +optional
	SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"`

	PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// HostNetwork indicates if the pod should run in the host networking namespace.
	// +optional
	HostNetwork bool `json:"hostNetwork,omitempty"`

	// VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset.
	// +optional
	// +listType=atomic
	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`

	// VolumeMounts represents the mount points to use in the underlying collector deployment(s)
	// +optional
	// +listType=atomic
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`

	// Volumes represents which volumes to use in the underlying collector deployment(s).
	// +optional
	// +listType=atomic
	Volumes []v1.Volume `json:"volumes,omitempty"`

	// Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator
	// will attempt to infer the required ports by parsing the .Spec.Config property but this property can be
	// used to open aditional ports that can't be inferred by the operator, like for custom receivers.
	// +optional
	// +listType=atomic
	Ports []v1.ServicePort `json:"ports,omitempty"`

	// ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be
	// consumed in the config file for the Collector.
	// +optional
	Env []v1.EnvVar `json:"env,omitempty"`

	// List of sources to populate environment variables on the OpenTelemetry Collector's Pods.
	// These can then in certain cases be consumed in the config file for the Collector.
	// +optional
	EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"`

	// Resources to set on the OpenTelemetry Collector pods.
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`

	// Toleration to schedule OpenTelemetry Collector pods.
	// This is only relevant to daemonsets, statefulsets and deployments
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`

	// PodAnnotations is the set of annotations that will be attached to
	// Collector and Target Allocator pods.
	// +optional
	PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
}

OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.

func (*OpenTelemetryCollectorSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec.

func (*OpenTelemetryCollectorSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpenTelemetryCollectorStatus

type OpenTelemetryCollectorStatus struct {
	// Replicas is currently not being set and might be removed in the next version.
	// +optional
	Replicas int32 `json:"replicas,omitempty"`

	// Version of the managed OpenTelemetry Collector (operand)
	// +optional
	Version string `json:"version,omitempty"`

	// Messages about actions performed by the operator on this resource.
	// +optional
	// +listType=atomic
	Messages []string `json:"messages,omitempty"`
}

OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector.

func (*OpenTelemetryCollectorStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus.

func (*OpenTelemetryCollectorStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpenTelemetryTargetAllocator

type OpenTelemetryTargetAllocator struct {
	// Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not.
	// +optional
	Enabled bool `json:"enabled,omitempty"`

	// Image indicates the container image to use for the OpenTelemetry TargetAllocator.
	// +optional
	Image string `json:"image,omitempty"`
}

OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator.

func (*OpenTelemetryTargetAllocator) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator.

func (*OpenTelemetryTargetAllocator) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Propagator

type Propagator string

Propagator represents the propagation type. +kubebuilder:validation:Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none

const (
	// TraceContext represents W3C Trace Context.
	TraceContext Propagator = "tracecontext"
	// Baggage represents W3C Baggage.
	Baggage Propagator = "baggage"
	// B3 represents B3 Single.
	B3 Propagator = "b3"
	// B3Multi represents B3 Multi.
	B3Multi Propagator = "b3multi"
	// Jaeger represents Jaeger.
	Jaeger Propagator = "jaeger"
	// XRay represents AWS X-Ray.
	XRay Propagator = "xray"
	// OTTrace represents OT Trace.
	OTTrace Propagator = "ottrace"
	// None represents automatically configured propagator.
	None Propagator = "none"
)

type Python

type Python struct {
	// Image is a container image with Python SDK and auto-instrumentation.
	// +optional
	Image string `json:"image,omitempty"`
}

Python defines Python SDK and instrumentation configuration.

func (*Python) DeepCopy

func (in *Python) DeepCopy() *Python

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Python.

func (*Python) DeepCopyInto

func (in *Python) DeepCopyInto(out *Python)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Resource

type Resource struct {
	// Attributes defines attributes that are added to the resource.
	// For example environment: dev
	// +optional
	Attributes map[string]string `json:"resourceAttributes,omitempty"`

	// AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid).
	// +optional
	AddK8sUIDAttributes bool `json:"addK8sUIDAttributes,omitempty"`
}

Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. See also: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/overview.md#resources

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Sampler

type Sampler struct {
	// Type defines sampler type.
	// The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio...
	// +optional
	Type SamplerType `json:"type,omitempty"`

	// Argument defines sampler argument.
	// The value depends on the sampler type.
	// For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25.
	// +optional
	Argument string `json:"argument,omitempty"`
}

Sampler defines sampling configuration.

func (*Sampler) DeepCopy

func (in *Sampler) DeepCopy() *Sampler

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sampler.

func (*Sampler) DeepCopyInto

func (in *Sampler) DeepCopyInto(out *Sampler)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SamplerType

type SamplerType string

SamplerType represents sampler type. +kubebuilder:validation:Enum=always_on;always_off;traceidratio;parentbased_always_on;parentbased_always_off;parentbased_traceidratio;jaeger_remote;xray

const (
	// AlwaysOn represents AlwaysOnSampler.
	AlwaysOn SamplerType = "always_on"
	// AlwaysOff represents AlwaysOffSampler.
	AlwaysOff SamplerType = "always_off"
	// TraceIDRatio represents TraceIdRatioBased.
	TraceIDRatio SamplerType = "traceidratio"
	// ParentBasedAlwaysOn represents ParentBased(root=AlwaysOnSampler).
	ParentBasedAlwaysOn SamplerType = "parentbased_always_on"
	// ParentBasedAlwaysOff represents ParentBased(root=AlwaysOffSampler).
	ParentBasedAlwaysOff SamplerType = "parentbased_always_off"
	// ParentBasedTraceIDRatio represents ParentBased(root=TraceIdRatioBased).
	ParentBasedTraceIDRatio SamplerType = "parentbased_traceidratio"
	// JaegerRemote represents JaegerRemoteSampler.
	JaegerRemote SamplerType = "jaeger_remote"
	// XRay represents AWS X-Ray Centralized Sampling.
	XRaySampler SamplerType = "xray"
)

Jump to

Keyboard shortcuts

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