Documentation
¶
Overview ¶
Package otelstandalone provides a Pulumi component that deploys the Datadog otel-agent as a standalone DaemonSet, without a co-located core Datadog Agent. Use this instead of the Datadog Helm chart when testing DD_OTEL_STANDALONE=true, because the Helm chart always includes the core-agent container and does not expose a values path to set env vars on the otel-agent sidecar.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func K8sAppDefinition ¶
func K8sAppDefinition(e config.Env, kubeProvider *kubernetes.Provider, namespace string, otelConfig string, fakeIntake *fakeintake.Fakeintake, appOpts ...AppOption) (*agent.KubernetesAgent, error)
K8sAppDefinition deploys the Datadog otel-agent as a standalone DaemonSet. It merges the fakeintake URL into the OTel exporter config so that telemetry is captured by the fakeintake during E2E tests.
The returned *agent.KubernetesAgent has LinuxNodeAgent.LabelSelectors["app"] set to "standalone-otel-agent", which is what test utilities such as getAgentPod use to locate the pod.
Pass AppOption values to customise the deployment (extra env vars, volumes, K8s Secrets, etc.). Pulumi resource options are always added internally.
Types ¶
type AppOption ¶
type AppOption func(*appConfig)
AppOption is a functional option for K8sAppDefinition that controls application-level deployment (env vars, volumes, K8s Secrets, etc.).
func WithExtraEnvVars ¶
func WithExtraEnvVars(vars ...corev1.EnvVarInput) AppOption
WithExtraEnvVars appends env vars to the otel-agent container. If you need to override DD_HOSTNAME, use WithoutDefaultHostname() so the downward-API DD_HOSTNAME does not shadow your value.
func WithExtraVolumeMounts ¶
func WithExtraVolumeMounts(mounts ...corev1.VolumeMountInput) AppOption
WithExtraVolumeMounts appends volume mounts to the otel-agent container.
func WithExtraVolumes ¶
func WithExtraVolumes(vols ...corev1.VolumeInput) AppOption
WithExtraVolumes appends volumes to the DaemonSet pod spec.
func WithK8sSecret ¶
WithK8sSecret creates a Kubernetes Opaque secret in the DaemonSet namespace before the DaemonSet starts so pods can mount it immediately. data maps secret keys to their plaintext values (Kubernetes handles base64).
func WithoutDefaultHostname ¶
func WithoutDefaultHostname() AppOption
WithoutDefaultHostname disables the built-in DD_HOSTNAME downward-API env var (which normally resolves to the node name via spec.nodeName). Use this when you want to supply DD_HOSTNAME yourself via WithExtraEnvVars so that the agent reads your value first — Go's os.Getenv returns the first matching variable, and the downward-API entry would otherwise shadow yours.