Skip to content

Commit

Permalink
Expose options such as collector.interval of memory bandwidth exporte…
Browse files Browse the repository at this point in the history
…r in k8s manifests and docker for user configuration. (#441)

Signed-off-by: Yugar-1 <[email protected]>
  • Loading branch information
Yugar-1 authored Sep 19, 2024
1 parent 593458c commit 2517e79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kubernetes-addons/memory-bandwidth-exporter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ WORKDIR /
COPY --from=builder /workspace/memory-bandwidth-exporter .

ENTRYPOINT ["bash", "-c"]
CMD ["/memory-bandwidth-exporter --collector.node.name=${NODE_NAME} --collector.container.namespaceWhiteList=${NAMESPACE_WHITELIST}"]
CMD ["/memory-bandwidth-exporter --collector.node.name=${NODE_NAME} --collector.container.namespaceWhiteList=${NAMESPACE_WHITELIST} --collector.interval=${COLLECTER_INTERVAL} --collector.container.metrics=${CONTAINER_METRICS} --collector.class.metrics=${CLASS_METRICS} --collector.node.metrics=${NODE_METRICS} --web.listen-address=${WEB_LISTEN_ADDRESS}"]
7 changes: 6 additions & 1 deletion kubernetes-addons/memory-bandwidth-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ curl http://localhost:9100/metrics
make docker.build
sudo docker run \
-e NODE_NAME=<node_name> \
-e NAMESPACE_WHITELIST="calico-apiserver,calico-system,kube-system,tigera-operator" \
-e NAMESPACE_WHITELIST="kube-system" \
-e COLLECTER_INTERVAL=1s \
-e CONTAINER_METRICS="all" \
-e CLASS_METRICS="none" \
-e NODE_METRICS="none" \
-e WEB_LISTEN_ADDRESS=":9100" \
--mount type=bind,source=/etc/containers/oci/hooks.d/,target=/etc/containers/oci/hooks.d/ \
--privileged \
--cgroupns=host \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ spec:
fieldRef:
fieldPath: spec.nodeName
- name: NAMESPACE_WHITELIST
value: "calico-apiserver,calico-system,kube-system,tigera-operator"
value: "kube-system"
- name: COLLECTER_INTERVAL
value: 1s
- name: CONTAINER_METRICS
value: "all"
- name: CLASS_METRICS
value: "none"
- name: NODE_METRICS
value: "none"
- name: WEB_LISTEN_ADDRESS
value: ":9100"
volumeMounts:
- name: hooks
mountPath: /etc/containers/oci/hooks.d/
Expand Down

0 comments on commit 2517e79

Please sign in to comment.