common

package
v1.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DatadogTokenOldResourceName          = "datadogtoken"            // Kept for backward compatibility with agent <7.37.0
	DatadogLeaderElectionOldResourceName = "datadog-leader-election" // Kept for backward compatibility with agent <7.37.0
	DatadogCustomMetricsResourceName     = "datadog-custom-metrics"
	DatadogClusterIDResourceName         = "datadog-cluster-id"
	ExtensionAPIServerAuthResourceName   = "extension-apiserver-authentication"
	KubeSystemResourceName               = "kube-system"

	NodeAgentSuffix    = "node"
	ChecksRunnerSuffix = "ccr"
	ClusterAgentSuffix = "dca"

	CustomResourceDefinitionsName = "customresourcedefinitions"

	DefaultAgentInstallType = "k8s_manual"
)

Resource names

Variables

This section is empty.

Functions

func BuildEnvVarFromSecret

func BuildEnvVarFromSecret(name, key string) *corev1.EnvVarSource

BuildEnvVarFromSecret return an corev1.EnvVarSource correspond to a secret reference

func BuildEnvVarFromSource

func BuildEnvVarFromSource(name string, source *corev1.EnvVarSource) *corev1.EnvVar

BuildEnvVarFromSource return an *corev1.EnvVar from a Env Var name and *corev1.EnvVarSource

func GetAgentLocalServiceSelector

func GetAgentLocalServiceSelector(dda metav1.Object) map[string]string

GetAgentLocalServiceSelector creates the selector to be used for the agent local service

func GetAgentVersion

func GetAgentVersion(dda metav1.Object) string

GetAgentVersion return the Agent version based on the DatadogAgent info

func GetAgentVersionFromImage

func GetAgentVersionFromImage(imageConfig v2alpha1.AgentImageConfig) string

GetAgentVersionFromImage returns the Agent version based on the AgentImageConfig

func GetDefaultLabels

func GetDefaultLabels(owner metav1.Object, componentKind, componentName, version string) map[string]string

func GetDefaultMetadata

func GetDefaultMetadata(owner metav1.Object, componentKind, componentName, version string, selector *metav1.LabelSelector) (map[string]string, map[string]string, *metav1.LabelSelector)

func GetDefaultSeccompConfigMapName

func GetDefaultSeccompConfigMapName(dda metav1.Object) string

GetDefaultSeccompConfigMapName returns the default seccomp configmap name based on the DatadogAgent name

func GetInstallInfoConfigMapName

func GetInstallInfoConfigMapName(dda metav1.Object) string

GetInstallInfoConfigMapName return the InstallInfo config map name base on the dda name

func GetVolumeForAuth

func GetVolumeForAuth() corev1.Volume

GetVolumeForAuth return the Volume container authentication information

func GetVolumeForCertificates

func GetVolumeForCertificates() corev1.Volume

GetVolumeForCertificates return the Volume use to store certificates

func GetVolumeForCgroups

func GetVolumeForCgroups() corev1.Volume

GetVolumeForCgroups returns the volume that contains the cgroup directory

func GetVolumeForChecksd

func GetVolumeForChecksd() corev1.Volume

GetVolumeForChecksd return the volume that contains the agent confd config files

func GetVolumeForConfd

func GetVolumeForConfd() corev1.Volume

GetVolumeForConfd return the volume that contains the agent confd config files

func GetVolumeForConfig

func GetVolumeForConfig() corev1.Volume

GetVolumeForConfig return the volume that contains the agent config

func GetVolumeForDogstatsd

func GetVolumeForDogstatsd() corev1.Volume

GetVolumeForDogstatsd returns the volume with the Dogstatsd socket

func GetVolumeForLogs

func GetVolumeForLogs() corev1.Volume

GetVolumeForLogs return the Volume that should container generated logs

func GetVolumeForProc

func GetVolumeForProc() corev1.Volume

GetVolumeForProc returns the volume with /proc

func GetVolumeForRmCorechecks

func GetVolumeForRmCorechecks() corev1.Volume

GetVolumeForRmCorechecks return the volume that overwrites the corecheck directory

func GetVolumeForRuntimeSocket

func GetVolumeForRuntimeSocket() corev1.Volume

GetVolumeForRuntimeSocket returns the Volume for the runtime socket

func GetVolumeForSeccomp

func GetVolumeForSeccomp() corev1.Volume

GetVolumeForSeccomp returns the volume for seccomp root

func GetVolumeForSecurity

func GetVolumeForSecurity(owner metav1.Object) corev1.Volume

GetVolumeForSecurity returns the Volume for datadog-agent-security

func GetVolumeForTmp

func GetVolumeForTmp() corev1.Volume

GetVolumeForTmp return the Volume use for /tmp

func GetVolumeInstallInfo

func GetVolumeInstallInfo(owner metav1.Object) corev1.Volume

GetVolumeInstallInfo return the Volume that should install-info file

func GetVolumeMountForAuth

func GetVolumeMountForAuth(readOnly bool) corev1.VolumeMount

GetVolumeMountForAuth returns the VolumeMount that contains the authentication information

func GetVolumeMountForCertificates

func GetVolumeMountForCertificates() corev1.VolumeMount

GetVolumeMountForCertificates return the VolumeMount use to store certificates

func GetVolumeMountForCgroups

func GetVolumeMountForCgroups() corev1.VolumeMount

GetVolumeMountForCgroups returns the VolumeMount that contains the cgroups info

func GetVolumeMountForChecksd

func GetVolumeMountForChecksd() corev1.VolumeMount

GetVolumeMountForChecksd return the VolumeMount that contains the agent checksd config files

func GetVolumeMountForConfd

func GetVolumeMountForConfd() corev1.VolumeMount

GetVolumeMountForConfd return the VolumeMount that contains the agent confd config files

func GetVolumeMountForConfig

func GetVolumeMountForConfig() corev1.VolumeMount

GetVolumeMountForConfig return the VolumeMount that contains the agent config

func GetVolumeMountForDogstatsdSocket

func GetVolumeMountForDogstatsdSocket(readOnly bool) corev1.VolumeMount

GetVolumeMountForDogstatsdSocket returns the VolumeMount with the Dogstatsd socket

func GetVolumeMountForInstallInfo

func GetVolumeMountForInstallInfo() corev1.VolumeMount

GetVolumeMountForInstallInfo return the VolumeMount that contains the agent install-info file

func GetVolumeMountForLogs

func GetVolumeMountForLogs() corev1.VolumeMount

GetVolumeMountForLogs return the VolumeMount for the container generated logs

func GetVolumeMountForProc

func GetVolumeMountForProc() corev1.VolumeMount

GetVolumeMountForProc returns the VolumeMount that contains /proc

func GetVolumeMountForRmCorechecks

func GetVolumeMountForRmCorechecks() corev1.VolumeMount

GetVolumeMountForRmCorechecks return the VolumeMount that overwrites the corechecks directory

func GetVolumeMountForRuntimeSocket

func GetVolumeMountForRuntimeSocket(readOnly bool) corev1.VolumeMount

GetVolumeMountForRuntimeSocket returns the VolumeMount with the runtime socket

func GetVolumeMountForSeccomp

func GetVolumeMountForSeccomp() corev1.VolumeMount

GetVolumeMountForSeccomp returns the VolumeMount for seccomp root

func GetVolumeMountForSecurity

func GetVolumeMountForSecurity() corev1.VolumeMount

GetVolumeMountForSecurity returns the VolumeMount for datadog-agent-security

func GetVolumeMountForTmp

func GetVolumeMountForTmp() corev1.VolumeMount

GetVolumeMountForTmp return the VolumeMount for /tmp

func NewDeployment

func NewDeployment(owner metav1.Object, componentKind, componentName, version string, inputSelector *metav1.LabelSelector) *appsv1.Deployment

NewDeployment use to generate the skeleton of a new deployment based on few information

func ShouldCreateAgentLocalService

func ShouldCreateAgentLocalService(versionInfo *version.Info, forceEnableLocalService bool) bool

ShouldCreateAgentLocalService returns whether the node agent local service should be created based on the Kubernetes version

Types

This section is empty.

Jump to

Keyboard shortcuts

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