v1alpha2

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

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

	// 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 Agent

type Agent struct {
	// Language is the language that will be instrumented.
	Language string `json:"language,omitempty"`

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

	// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
	// The default size is 200Mi.
	// +optional
	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"`
}

Agent is the configuration for the agent

func (*Agent) DeepCopy

func (in *Agent) DeepCopy() *Agent

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

func (*Agent) DeepCopyInto

func (in *Agent) DeepCopyInto(out *Agent)

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

func (*Agent) IsEmpty

func (a *Agent) IsEmpty() bool

IsEmpty is used to check if the agent is empty, excluding `.Language`

func (*Agent) IsEqual

func (a *Agent) IsEqual(b Agent) bool

IsEqual is used to compare if an agent is equal to another, excluding `.Language`

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 {
	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.

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

	// PodLabelSelector defines to which pods the config should be applied.
	// +optional
	PodLabelSelector metav1.LabelSelector `json:"podLabelSelector"`

	// PodLabelSelector defines to which pods the config should be applied.
	// +optional
	NamespaceLabelSelector metav1.LabelSelector `json:"namespaceLabelSelector"`

	// LicenseKeySecret defines where to take the licenseKeySecret.
	// it should be present in the operator namespace.
	// +optional
	LicenseKeySecret string `json:"licenseKeySecret,omitempty"`

	// Agent defines configuration for agent instrumentation.
	Agent Agent `json:"agent,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 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 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 is the attributes that are added to the resource

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.

func (Resource) IsEmpty

func (r Resource) IsEmpty() bool

IsEmpty is used to check if the resource is empty

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