Skip to content

Commit 5f32023

Browse files
committed
Bug 1715370 - Some orphaned logs sent to .operations.* index
by mistake. Adding a check to fluentd/run.sh if bearer_token_file (/var/run/secrets/kubernetes.io/serviceaccount/token) for the kubernetes api server exists and is not empty.
1 parent 9ef1e4e commit 5f32023

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fluentd/run.sh

+6
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ if [ -z $ES_PORT ]; then
9999
exit 1
100100
fi
101101

102+
# Check bearer_token_file for fluent-plugin-kubernetes_metadata_filter.
103+
if [ ! -s /var/run/secrets/kubernetes.io/serviceaccount/token ] ; then
104+
echo "ERROR: Bearer_token_file (/var/run/secrets/kubernetes.io/serviceaccount/token) to access the Kubernetes API server is missing or empty."
105+
exit 1
106+
fi
107+
102108
# How many outputs?
103109
# check ES_HOST vs. OPS_HOST; ES_PORT vs. OPS_PORT
104110
if [ "$ES_HOST" = ${OPS_HOST:-""} -a $ES_PORT -eq ${OPS_PORT:-0} ]; then

0 commit comments

Comments
 (0)