@cryptotaxi247 / netdata-1 / commits / cac39ebd2

Rename NETDATA_PORT to NETDATA_LISTENER_PORT (#10045)

Because it clashes with a kubernetes defined NETDATA_PORT variable: Our Helm chart creates a service called netdata which in turn makes kubernetes export a NETDATA_PORT environment variable with a value like tcp://<ip>:19999 which is not parsable by the netdata agent as a value to the `-p` argument.

Konstantinos Natsakis committed Oct 9, 2020 at 15:02 UTC cac39ebd2dae7f923ee95c94f473571cccdf0305
2 files changed +3 -3
packaging/docker/Dockerfile
+2 -2
@@ -107,8 +107,8 @@ RUN \
107 # Install any Python wheels
108 RUN pip install /wheels/*
109
110 -ENV NETDATA_PORT 19999
111 -EXPOSE $NETDATA_PORT
110 +ENV NETDATA_LISTENER_PORT 19999
111 +EXPOSE $NETDATA_LISTENER_PORT
112
113 ENTRYPOINT ["/usr/sbin/run.sh"]
114
packaging/docker/run.sh
+1 -1
@@ -19,6 +19,6 @@ if [ -n "${PGID}" ]; then
19 usermod -a -G "${PGID}" "${DOCKER_USR}" || echo >&2 "Could not add netdata user to group docker with ID ${PGID}"
20 fi
21
22 -exec /usr/sbin/netdata -u "${DOCKER_USR}" -D -s /host -p "${NETDATA_PORT}" -W set web "web files group" root -W set web "web files owner" root "$@"
22 +exec /usr/sbin/netdata -u "${DOCKER_USR}" -D -s /host -p "${NETDATA_LISTENER_PORT}" -W set web "web files group" root -W set web "web files owner" root "$@"
23
24 echo "Netdata entrypoint script, completed!"