Skip to content

Commit

Permalink
Support /conf.d in cluster-agent image (DataDog#2896)
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello authored Jan 23, 2019
1 parent 72fa31c commit e156ac8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfiles/cluster-agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ COPY --from=builder /output /
# of an empty folder. Creating .placeholder files as a workaround.
#
RUN adduser --system --no-create-home --disabled-password --ingroup root dd-agent \
&& mkdir -p /var/log/datadog/ \
&& mkdir -p /var/log/datadog/ /conf.d \
&& touch /var/log/datadog/.placeholder \
&& touch /tmp/.placeholder \
&& chown -R dd-agent:root /etc/datadog-agent/ /var/log/datadog/ /tmp/ \
&& chmod g+r,g+w,g+X -R /etc/datadog-agent/ /var/log/datadog/ /tmp/
&& chown -R dd-agent:root /etc/datadog-agent/ /var/log/datadog/ /conf.d /tmp/ \
&& chmod g+r,g+w,g+X -R /etc/datadog-agent/ /var/log/datadog/ /conf.d /tmp/

# Incompatible with the custom metrics API on port 443
# Set DD_EXTERNAL_METRICS_PROVIDER_PORT to a higher value to run as non-root
Expand Down
3 changes: 3 additions & 0 deletions Dockerfiles/cluster-agent/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ if [[ -z "$DD_API_KEY" ]]; then
exit 1
fi

##### Copy the custom confs #####
find /conf.d -name '*.yaml' -exec cp --parents -fv {} /etc/datadog-agent/ \;

##### Starting up #####
export PATH="/opt/datadog-agent/bin/datadog-cluster-agent/:/opt/datadog-agent/embedded/bin/":$PATH

Expand Down

0 comments on commit e156ac8

Please sign in to comment.