@@ -29,12 +29,13 @@ type expectedPorts struct {
2929}
3030
3131type expectedEnvVars struct {
32- agent_ipc_port expectedEnvVar
33- agent_ipc_refresh expectedEnvVar
34- enabled expectedEnvVar
35- extension_timeout expectedEnvVar
36- extension_url expectedEnvVar
37- converter_features expectedEnvVar
32+ agent_ipc_port expectedEnvVar
33+ agent_ipc_refresh expectedEnvVar
34+ enabled expectedEnvVar
35+ extension_timeout expectedEnvVar
36+ extension_url expectedEnvVar
37+ converter_features expectedEnvVar
38+ installation_method expectedEnvVar
3839}
3940
4041type expectedEnvVar struct {
6465 extension_timeout : expectedEnvVar {},
6566 extension_url : expectedEnvVar {},
6667 converter_features : expectedEnvVar {},
68+ installation_method : expectedEnvVar {
69+ present : true ,
70+ value : "kubernetes" ,
71+ },
6772 }
6873
6974 onlyIpcEnvVars = expectedEnvVars {
7580 present : true ,
7681 value : "60" ,
7782 },
83+ installation_method : expectedEnvVar {
84+ present : true ,
85+ value : "kubernetes" ,
86+ },
7887 }
7988 defaultVolumeMounts = []corev1.VolumeMount {
8089 {
@@ -234,6 +243,10 @@ func Test_otelCollectorFeature_Configure(t *testing.T) {
234243 present : true ,
235244 value : "health_check,zpages,pprof,ddflare" ,
236245 },
246+ installation_method : expectedEnvVar {
247+ present : true ,
248+ value : "kubernetes" ,
249+ },
237250 },
238251 map [string ]string {"checksum/otel_agent-custom-config" : "b4ea5ecc5c7901d3b48c58622379ecfb" },
239252 defaultVolumeMounts ,
@@ -272,6 +285,10 @@ func Test_otelCollectorFeature_Configure(t *testing.T) {
272285 present : true ,
273286 value : "health_check,zpages,pprof,ddflare" ,
274287 },
288+ installation_method : expectedEnvVar {
289+ present : true ,
290+ value : "kubernetes" ,
291+ },
275292 },
276293 map [string ]string {"checksum/otel_agent-custom-config" : "d9c73c9017a4fcb811da0e51f5044b3c" },
277294 defaultVolumeMounts ,
@@ -321,6 +338,10 @@ func Test_otelCollectorFeature_Configure(t *testing.T) {
321338 present : true ,
322339 value : "13" ,
323340 },
341+ installation_method : expectedEnvVar {
342+ present : true ,
343+ value : "kubernetes" ,
344+ },
324345 },
325346 defaultAnnotations ,
326347 defaultVolumeMounts ,
@@ -348,6 +369,10 @@ func Test_otelCollectorFeature_Configure(t *testing.T) {
348369 present : true ,
349370 value : "https://localhost:1234" ,
350371 },
372+ installation_method : expectedEnvVar {
373+ present : true ,
374+ value : "kubernetes" ,
375+ },
351376 },
352377 defaultAnnotations ,
353378 defaultVolumeMounts ,
@@ -384,6 +409,10 @@ func Test_otelCollectorFeature_Configure(t *testing.T) {
384409 present : true ,
385410 value : "true" ,
386411 },
412+ installation_method : expectedEnvVar {
413+ present : true ,
414+ value : "kubernetes" ,
415+ },
387416 },
388417 defaultAnnotations ,
389418 defaultVolumeMounts ,
@@ -547,6 +576,13 @@ func testExpectedAgent(
547576 })
548577 }
549578
579+ if expectedEnvVars .installation_method .present {
580+ wantEnvVarsOTel = append (wantEnvVarsOTel , & corev1.EnvVar {
581+ Name : DDOtelCollectorInstallationMethod ,
582+ Value : expectedEnvVars .installation_method .value ,
583+ })
584+ }
585+
550586 if len (wantEnvVars ) == 0 {
551587 wantEnvVars = nil
552588 }
0 commit comments