v1alpha1

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=newrelic.com

Index

Constants

View Source
const (
	AnnotationDefaultAutoInstrumentationJava   = "instrumentation.newrelic.com/default-auto-instrumentation-java-image"
	AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.newrelic.com/default-auto-instrumentation-nodejs-image"
	AnnotationDefaultAutoInstrumentationPython = "instrumentation.newrelic.com/default-auto-instrumentation-python-image"
	AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.newrelic.com/default-auto-instrumentation-dotnet-image"
	AnnotationDefaultAutoInstrumentationPhp    = "instrumentation.newrelic.com/default-auto-instrumentation-php-image"
	AnnotationDefaultAutoInstrumentationGo     = "instrumentation.newrelic.com/default-auto-instrumentation-go-image"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "newrelic.com", 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 DotNet

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

	// Env defines DotNet specific env vars.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

func (*DotNet) DeepCopy

func (in *DotNet) DeepCopy() *DotNet

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

func (*DotNet) DeepCopyInto

func (in *DotNet) DeepCopyInto(out *DotNet)

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

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 Go

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

	// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
	// The default size is 200Mi.
	VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

	// Env defines Go specific env vars. There are four layers for env vars' definitions and
	// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Resources describes the compute resource requirements.
	// +optional
	Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
}

func (*Go) DeepCopy

func (in *Go) DeepCopy() *Go

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

func (*Go) DeepCopyInto

func (in *Go) DeepCopyInto(out *Go)

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

type Instrumentation

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

	Spec   InstrumentationSpec   `json:"spec,omitempty"`
	Status InstrumentationStatus `json:"status,omitempty"`
}

Instrumentation is the Schema for the instrumentations API

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 (r *Instrumentation) ValidateCreate() error

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

func (*Instrumentation) ValidateDelete

func (r *Instrumentation) ValidateDelete() error

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

func (*Instrumentation) ValidateUpdate

func (r *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.
	// Values in this list will be set in the OTEL_PROPAGATORS env var.
	// Enum=tracecontext;none
	// +optional
	Propagators []Propagator `json:"propagators,omitempty"`

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

	// Env defines common env vars. There are four layers for env vars' definitions and
	// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,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"`

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

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

	// Go defines configuration for Go auto-instrumentation.
	// When using Go auto-instrumentation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the
	// Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation.
	// Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged.
	// +optional
	Go Go `json:"go,omitempty"`
}

InstrumentationSpec defines the desired state of 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 the observed state of 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"`

	// Env defines java specific env vars.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

Java defines Java agent 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 NodeJS

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

	// Env defines nodejs specific env vars.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

NodeJS defines NodeJS agent 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 Php

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

	// Env defines Php specific env vars.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

func (*Php) DeepCopy

func (in *Php) DeepCopy() *Php

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

func (*Php) DeepCopyInto

func (in *Php) DeepCopyInto(out *Php)

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;none

const (
	// TraceContext represents W3C Trace Context.
	TraceContext Propagator = "tracecontext"
	// None represents automatically configured propagator.
	None Propagator = "none"
)

type Python

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

	// Env defines python specific env vars.
	// If the former var had been defined, then the other vars would be ignored.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

Python defines Python agent 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"`
}

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 will be set in the OTEL_TRACES_SAMPLER env var.
	// 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.
	// The value will be set in the OTEL_TRACES_SAMPLER_ARG env var.
	// +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

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"
)

type UpgradeStrategy

type UpgradeStrategy string

UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed +kubebuilder:validation:Enum=automatic;none

const (
	// UpgradeStrategyAutomatic specifies that the operator will automatically apply upgrades to the CR.
	UpgradeStrategyAutomatic UpgradeStrategy = "automatic"

	// UpgradeStrategyNone specifies that the operator will not apply any upgrades to the CR.
	UpgradeStrategyNone UpgradeStrategy = "none"
)

Jump to

Keyboard shortcuts

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