Skip to content

Commit

Permalink
Merge pull request sustainable-computing-io#400 from vprashar2929/dis…
Browse files Browse the repository at this point in the history
…able-cgroup

fix: disable cgroup metrics for Kepler
  • Loading branch information
sthaha authored Jun 10, 2024
2 parents 3d37225 + 3bd9a6b commit da1c1fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions pkg/components/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ func NewConfigMap(d components.Detail, k *v1alpha1.KeplerInternal) *corev1.Confi
"BIND_ADDRESS": bindAddress,
"ENABLE_GPU": "true",
"ENABLE_QAT": "false",
"ENABLE_EBPF_CGROUPID": "true",
"ENABLE_EBPF_CGROUPID": "false",
"EXPOSE_HW_COUNTER_METRICS": "true",
"EXPOSE_IRQ_COUNTER_METRICS": "true",
"EXPOSE_KUBELET_METRICS": "true",
"EXPOSE_CGROUP_METRICS": "true",
"EXPOSE_CGROUP_METRICS": "false",
"ENABLE_PROCESS_METRICS": "false",
"CPU_ARCH_OVERRIDE": "",
"CGROUP_METRICS": "*",
Expand Down Expand Up @@ -617,7 +617,7 @@ func newExporterContainer(kiName, dsName string, deployment v1alpha1.InternalExp
Command: []string{
"/usr/bin/kepler",
"-address", bindAddress,
"-enable-cgroup-id=true",
"-enable-cgroup-id=$(ENABLE_EBPF_CGROUPID)",
"-enable-gpu=$(ENABLE_GPU)",
"-v=$(KEPLER_LOG_LEVEL)",
},
Expand All @@ -642,7 +642,8 @@ func newExporterContainer(kiName, dsName string, deployment v1alpha1.InternalExp
{Name: "NODE_IP", ValueFrom: k8s.EnvFromField("status.hostIP")},
{Name: "NODE_NAME", ValueFrom: k8s.EnvFromField("spec.nodeName")},
{Name: "KEPLER_LOG_LEVEL", ValueFrom: k8s.EnvFromConfigMap("KEPLER_LOG_LEVEL", kiName)},
{Name: "ENABLE_GPU", ValueFrom: k8s.EnvFromConfigMap("ENABLE_GPU", kiName)}},
{Name: "ENABLE_GPU", ValueFrom: k8s.EnvFromConfigMap("ENABLE_GPU", kiName)},
{Name: "ENABLE_EBPF_CGROUPID", ValueFrom: k8s.EnvFromConfigMap("ENABLE_EBPF_CGROUPID", kiName)}},
VolumeMounts: []corev1.VolumeMount{
{Name: "lib-modules", MountPath: "/lib/modules", ReadOnly: true},
{Name: "tracing", MountPath: "/sys", ReadOnly: true},
Expand Down
4 changes: 2 additions & 2 deletions pkg/components/exporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestDaemonSet(t *testing.T) {
"/usr/bin/kepler",
"-address",
"0.0.0.0:9103",
"-enable-cgroup-id=true",
"-enable-cgroup-id=$(ENABLE_EBPF_CGROUPID)",
"-enable-gpu=$(ENABLE_GPU)",
"-v=$(KEPLER_LOG_LEVEL)",
},
Expand Down Expand Up @@ -149,7 +149,7 @@ func TestDaemonSet(t *testing.T) {
"/usr/bin/kepler",
"-address",
"0.0.0.0:9103",
"-enable-cgroup-id=true",
"-enable-cgroup-id=$(ENABLE_EBPF_CGROUPID)",
"-enable-gpu=$(ENABLE_GPU)",
"-v=$(KEPLER_LOG_LEVEL)",
"-redfish-cred-file-path=/etc/redfish/redfish.csv",
Expand Down

0 comments on commit da1c1fc

Please sign in to comment.