otelcolresources

package
v0.0.0-...-61ab8c1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OtlpGrpcHostPort = 40317
	OtlpHttpHostPort = 40318
)

Variables

View Source
var (
	DefaultOTelColResourceSpecs = OTelColResourceSpecs{
		CollectorDaemonSetCollectorContainerResources: ResourceRequirementsWithGoMemLimit{
			Limits: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("500Mi"),
			},
			GoMemLimit: "400MiB",
			Requests: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("500Mi"),
			},
		},
		CollectorDaemonSetConfigurationReloaderContainerResources: ResourceRequirementsWithGoMemLimit{
			Limits: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("12Mi"),
			},
			GoMemLimit: "8MiB",
			Requests: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("12Mi"),
			},
		},
		CollectorDaemonSetFileLogOffsetSynchContainerResources: ResourceRequirementsWithGoMemLimit{
			Limits: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("32Mi"),
			},
			GoMemLimit: "24MiB",
			Requests: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("32Mi"),
			},
		},
		CollectorDeploymentCollectorContainerResources: ResourceRequirementsWithGoMemLimit{
			Limits: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("500Mi"),
			},
			GoMemLimit: "400MiB",
			Requests: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("500Mi"),
			},
		},
		CollectorDeploymentConfigurationReloaderContainerResources: ResourceRequirementsWithGoMemLimit{
			Limits: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("12Mi"),
			},
			GoMemLimit: "8MiB",
			Requests: corev1.ResourceList{
				corev1.ResourceMemory: resource.MustParse("12Mi"),
			},
		},
	}
)

Functions

func DaemonSetClusterRoleBindingName

func DaemonSetClusterRoleBindingName(namePrefix string) string

func DaemonSetClusterRoleName

func DaemonSetClusterRoleName(namePrefix string) string

func DaemonSetCollectorConfigConfigMapName

func DaemonSetCollectorConfigConfigMapName(namePrefix string) string

func DaemonSetName

func DaemonSetName(namePrefix string) string

func DeploymentClusterRoleBindingName

func DeploymentClusterRoleBindingName(namePrefix string) string

func DeploymentClusterRoleName

func DeploymentClusterRoleName(namePrefix string) string

func DeploymentCollectorConfigConfigMapName

func DeploymentCollectorConfigConfigMapName(namePrefix string) string

func DeploymentName

func DeploymentName(namePrefix string) string

func FilelogReceiverOffsetsConfigMapName

func FilelogReceiverOffsetsConfigMapName(namePrefix string) string

func ServiceName

func ServiceName(namePrefix string) string

Types

type OTelColResourceManager

type OTelColResourceManager struct {
	client.Client
	Scheme                  *runtime.Scheme
	DeploymentSelfReference *appsv1.Deployment
	OTelCollectorNamePrefix string
	OTelColResourceSpecs    *OTelColResourceSpecs
	IsIPv6Cluster           bool
	DevelopmentMode         bool
	// contains filtered or unexported fields
}

func (*OTelColResourceManager) CreateOrUpdateOpenTelemetryCollectorResources

func (m *OTelColResourceManager) CreateOrUpdateOpenTelemetryCollectorResources(
	ctx context.Context,
	namespace string,
	images util.Images,
	allMonitoringResources []dash0v1alpha1.Dash0Monitoring,
	monitoringResource *dash0v1alpha1.Dash0Monitoring,
	logger *logr.Logger,
) (bool, bool, error)

func (*OTelColResourceManager) DeleteResources

func (m *OTelColResourceManager) DeleteResources(
	ctx context.Context,
	namespace string,
	logger *logr.Logger,
) error

type OTelColResourceSpecs

type OTelColResourceSpecs struct {
	CollectorDaemonSetCollectorContainerResources             ResourceRequirementsWithGoMemLimit `json:"collectorDaemonSetCollectorContainerResources,omitempty"`
	CollectorDaemonSetConfigurationReloaderContainerResources ResourceRequirementsWithGoMemLimit `json:"collectorDaemonSetConfigurationReloaderContainerResources,omitempty"`
	CollectorDaemonSetFileLogOffsetSynchContainerResources    ResourceRequirementsWithGoMemLimit `json:"collectorDaemonSetFileLogOffsetSynchContainerResources,omitempty"`

	CollectorDeploymentCollectorContainerResources             ResourceRequirementsWithGoMemLimit `json:"collectorDeploymentCollectorContainerResources,omitempty"`
	CollectorDeploymentConfigurationReloaderContainerResources ResourceRequirementsWithGoMemLimit `json:"collectorDeploymentConfigurationReloaderContainerResources,omitempty"`
}

func ReadOTelColResourcesConfiguration

func ReadOTelColResourcesConfiguration(configurationFile string) (*OTelColResourceSpecs, error)

type OtlpExporter

type OtlpExporter struct {
	Name     string
	Endpoint string
	Headers  []dash0v1alpha1.Header
	Encoding string
	Insecure bool
}

func ConvertExportSettingsToExporterList

func ConvertExportSettingsToExporterList(export dash0v1alpha1.Export) ([]OtlpExporter, error)

type ResourceRequirementsWithGoMemLimit

type ResourceRequirementsWithGoMemLimit struct {
	Limits     corev1.ResourceList `json:"limits,omitempty"`
	Requests   corev1.ResourceList `json:"requests,omitempty"`
	GoMemLimit string              `json:"gomemlimit,omitempty"`
}

func (ResourceRequirementsWithGoMemLimit) ToResourceRequirements

Jump to

Keyboard shortcuts

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