Skip to content

Commit

Permalink
docs: update kepler_daemon for super linter
Browse files Browse the repository at this point in the history
Signed-off-by: Maryam Tahhan <[email protected]>
  • Loading branch information
maryamtahhan committed Apr 2, 2024
1 parent 84378f0 commit f4c9f37
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions docs/usage/kepler_daemon.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
# Kepler DaemonSet Customization

Kepler enables a function to hybrid read environment variable from attributes directly (container.env) and from the ConfigMap. Note that, all steps will be operated by [Kepler Operator](https://github.com/sustainable-computing-io/kepler-operator) if the operator is installed.

To set environments by ConfigMap:

1. Create/Generate ConfigMap

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: kepler-cfm
namespace: kepler-system
data:
MODEL_SERVER_ENABLE: true
COUNTER_METRICS: '*'
CGROUP_METRICS: '*'
BPF_METRICS: '*'
# KUBELET_METRICS: ''
# GPU_METRICS: ''
PERF_METRICS: '*'
MODEL_CONFIG: |
POD_COMPONENT_ESTIMATOR=true
POD_COMPONENT_INIT_URL=https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-server/main/tests/test_models/DynComponentPower/CgroupOnly/ScikitMixed.zip
```
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: kepler-cfm
namespace: kepler-system
data:
MODEL_SERVER_ENABLE: true
COUNTER_METRICS: '*'
CGROUP_METRICS: '*'
BPF_METRICS: '*'
# KUBELET_METRICS: ''
# GPU_METRICS: ''
PERF_METRICS: '*'
MODEL_CONFIG: |
POD_COMPONENT_ESTIMATOR=true
POD_COMPONENT_INIT_URL=https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-server/main/tests/test_models/DynComponentPower/CgroupOnly/ScikitMixed.zip
```
2. Mount the ConfigMap to DaemonSet:
```yaml
spec:
containers:
- name: kepler-exporter
volumeMounts:
- name: cfm
mountPath: /etc/config
readOnly: true
volumes:
- name: cfm
configMap:
name: kepler-cfm
```
```yaml
spec:
containers:
- name: kepler-exporter
volumeMounts:
- name: cfm
mountPath: /etc/config
readOnly: true
volumes:
- name: cfm
configMap:
name: kepler-cfm
```

0 comments on commit f4c9f37

Please sign in to comment.