Skip to content

Commit 7bcc5e5

Browse files
author
Sunil Thaha
authored
Merge pull request #2153 from vprashar2929/ci-pod
ci: ensure pod level metrics are exported
2 parents faf7dc3 + 84d959b commit 7bcc5e5

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.github/k8s/action.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ runs:
118118
kepler_node_cpu_idle_watts \
119119
kepler_process_cpu_joules_total \
120120
kepler_container_cpu_joules_total \
121-
kepler_container_cpu_watts; do
121+
kepler_container_cpu_watts \
122+
kepler_pod_cpu_joules_total \
123+
kepler_pod_cpu_watts; do
122124
echo "Checking metric: $metric"
123125
if ! grep -q "$metric" /tmp/metrics.txt; then
124126
echo "Metric $metric not found"

.github/workflows/k8s-equinix.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ jobs:
171171
kepler_node_cpu_idle_watts \
172172
kepler_process_cpu_joules_total \
173173
kepler_container_cpu_joules_total \
174-
kepler_container_cpu_watts; do
174+
kepler_container_cpu_watts \
175+
kepler_pod_cpu_joules_total \
176+
kepler_pod_cpu_watts; do
175177
echo "Checking metric: $metric"
176178
if ! grep -q "$metric" /tmp/metrics.txt; then
177179
echo "Metric $metric not found"

manifests/k8s/daemonset.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ spec:
3535
- /usr/bin/kepler
3636
args:
3737
- --config.file=/etc/kepler/config.yaml
38+
- --kube.enable
39+
- --kube.node-name=$(NODE_NAME)
3840
ports:
3941
- name: http
4042
containerPort: 28282
@@ -54,6 +56,12 @@ spec:
5456
port: http
5557
initialDelaySeconds: 10
5658
periodSeconds: 60
59+
env:
60+
- name: NODE_NAME
61+
valueFrom:
62+
fieldRef:
63+
apiVersion: v1
64+
fieldPath: spec.nodeName
5765
volumes:
5866
- name: sysfs
5967
hostPath:

0 commit comments

Comments
 (0)