Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose options of memory bandwidth exporter in k8s manifests and docker for user configuration #441

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading