Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCPBUGS-13153: Limit the value of GOMAXPROCS on node-exporter.
xxxxx Signed-off-by: Ayoub Mrini <amrini@redhat.com>
- Loading branch information
1 parent
076da3b
commit 23c315a
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: node-exporter-entrypoint | ||
namespace: openshift-monitoring | ||
data: | ||
entrypoint: | | ||
export GOMAXPROCS=4 | ||
# no affinity even when cpusets is set as requests is not integer | ||
NUM_CPUS=$(grep -c '^processor' "/proc/cpuinfo" 2>/dev/null || echo "0") | ||
if [ "$NUM_CPUS" -lt "$GOMAXPROCS" ]; then | ||
export GOMAXPROCS="$NUM_CPUS" | ||
fi | ||
echo "Set GOMAXPROCS=$GOMAXPROCS" | ||
# TODO: maybe get /bin/node_exporter somewhere? envvar? | ||
exec /bin/node_exporter "$@" |