Skip to content

Commit 3549630

Browse files
Use POD_NAME as the name for filebeat sidecar container
1 parent e1f2836 commit 3549630

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controllers/spec/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,8 +2407,8 @@ func makeFilebeatContainer(volumeMounts []corev1.VolumeMount, envVar []corev1.En
24072407
Name: "logTopic",
24082408
Value: logTopic,
24092409
}, corev1.EnvVar{
2410-
Name: "logName",
2411-
Value: name,
2410+
Name: "POD_NAME",
2411+
ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.name"}},
24122412
})
24132413

24142414
if authConfig != nil {

controllers/spec/template/filebeat-config.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ output.pulsar:
66
fast_fail: true
77
url: \${brokerServiceURL}
88
topic: \${logTopic}
9-
name: \${logName}
9+
name: \${POD_NAME}
1010
token: \${clientAuthenticationParameters:""}
1111
oauth2:
1212
enabled: \${oauth2Enabled:false}

0 commit comments

Comments
 (0)