|
6 | 6 | [id="power-monitoring-kepler-configuration_{context}"]
|
7 | 7 | = The {PM-kepler} configuration
|
8 | 8 |
|
9 |
| -You can configure {PM-kepler} with the `spec` field of the `{PM-kepler}` resource. |
| 9 | +You can configure {PM-kepler} with the `spec` field of the `PowerMonitor` resource. |
10 | 10 |
|
11 | 11 | [IMPORTANT]
|
12 | 12 | ====
|
13 |
| -Ensure that the name of your {PM-kepler} instance is `kepler`. All other instances are rejected by the {PM-operator} Webhook. |
| 13 | +Ensure that the name of your `PowerMonitor` instance is `power-monitor`. All other instances are rejected by the {PM-operator} Webhook. |
14 | 14 | ====
|
15 | 15 |
|
16 | 16 | The following is the list of configuration options:
|
17 | 17 |
|
18 |
| -.{PM-kepler} configuration options |
19 |
| -[options="header"] |
| 18 | +.PowerMonitor configuration options |
| 19 | +[cols="1,3,2", options="header"] |
20 | 20 | |===
|
21 |
| -|Name |Spec |Description |Default |
22 |
| -|`port` |`exporter.deployment` |The port on the node where the Prometheus metrics are exposed. |`9103` |
23 |
| -|`nodeSelector` |`exporter.deployment` |The nodes on which {PM-kepler} exporter pods are scheduled. |`kubernetes.io/os: linux` |
24 |
| -|`tolerations` |`exporter.deployment` |The tolerations for {PM-kepler} exporter that allow the pods to be scheduled on nodes with specific characteristics. |`- operator: "Exists"` |
| 21 | +| Name |
| 22 | +| Description |
| 23 | +| Default Behavior |
| 24 | + |
| 25 | +| deployment.nodeSelector |
| 26 | +| The nodes on which Kepler (created by PowerMonitor) pods are scheduled. |
| 27 | +| kubernetes.io/os: linux |
| 28 | + |
| 29 | +| deployment.tolerations |
| 30 | +| The tolerations for Power Monitor that allow the pods to be scheduled on nodes with specific characteristics. |
| 31 | +| - operator: "Exists" |
| 32 | + |
| 33 | +| deployment.security.mode |
| 34 | +| Security mode can be set to either `none`, allowing unrestricted access to Kepler's metrics by any entity, or `rbac`, securing the metrics endpoint with TLS encryption and restricting access to authorized service accounts listed in `allowedSANames`. |
| 35 | +| Set to `rbac` by default and only user workload prometheus is allowed access. |
| 36 | + |
| 37 | +| deployment.security.allowedSANames |
| 38 | +| A list of Service Account Names that can access Kepler’s metrics endpoint when security mode is `rbac`. |
| 39 | +| In OpenShift, set to `openshift-user-workload-monitoring:prometheus-user-workload` to allow user workload monitoring to scrape Kepler. |
| 40 | + |
| 41 | +| config.logLevel |
| 42 | +| The level of logs to expose by Kepler. |
| 43 | +| Set to info. |
| 44 | + |
| 45 | +| config.metricLevels |
| 46 | +| A list of energy metric levels to expose. Possible values include `node`, `process`, `container`, `vm`, and `pod`. |
| 47 | +| The default list includes `node`, `pod`, and `vm`. |
| 48 | + |
| 49 | +| config.staleness |
| 50 | +| Specifies how long to wait before considering calculated power values as stale. |
| 51 | +| 500ms (500 milliseconds). |
| 52 | + |
| 53 | +| config.sampleRate |
| 54 | +| Specifies the interval for monitoring resources such as processes, containers, and VMs. |
| 55 | +| 5s (5 seconds). |
| 56 | + |
| 57 | +| config.maxTerminated |
| 58 | +| Controls terminated workload tracking. A negative value tracks unlimited workloads, zero disables tracking, and a positive value tracks the top N terminated workloads by energy consumption. |
| 59 | +| 500. |
| 60 | + |
25 | 61 | |===
|
26 | 62 |
|
27 |
| -.Example `{PM-kepler}` resource with default configuration |
| 63 | +.Example `PowerMonitor` resource with default configuration |
28 | 64 | [source,yaml]
|
29 | 65 | ----
|
30 |
| -apiVersion: kepler.system.sustainable.computing.io/v1alpha1 |
31 |
| -kind: Kepler |
| 66 | +apiVersion: v1alpha1 |
| 67 | +kind: PowerMonitor |
32 | 68 | metadata:
|
33 |
| - name: kepler |
| 69 | + labels: |
| 70 | + app.kubernetes.io/name: powermonitor |
| 71 | + app.kubernetes.io/instance: powermonitor |
| 72 | + app.kubernetes.io/part-of: kepler-operator |
| 73 | + name: power-monitor |
34 | 74 | spec:
|
35 |
| - exporter: |
| 75 | + kepler: |
36 | 76 | deployment:
|
37 |
| - port: 9103 # <1> |
38 |
| - nodeSelector: |
39 |
| - kubernetes.io/os: linux # <2> |
40 |
| - Tolerations: # <3> |
41 |
| - - key: "" |
42 |
| - operator: "Exists" |
43 |
| - value: "" |
44 |
| - effect: "" |
45 |
| ----- |
46 |
| -<1> The Prometheus metrics are exposed on port 9103. |
47 |
| -<2> {PM-kepler} pods are scheduled on Linux nodes. |
48 |
| -<3> The default tolerations allow {PM-kepler} to be scheduled on any node. |
| 77 | + nodeSelector: |
| 78 | + kubernetes.io/os: linux |
| 79 | +
|
| 80 | + tolerations: |
| 81 | + - key: key1 |
| 82 | + operator: Equal |
| 83 | + value: value1 |
| 84 | + effect: NoSchedule |
| 85 | +
|
| 86 | + security: |
| 87 | + mode: rbac |
| 88 | + allowedSANames: |
| 89 | + - openshift-user-workload-monitoring:prometheus-user-workload |
| 90 | +
|
| 91 | + config: |
| 92 | + logLevel: info |
| 93 | + metricLevels: [node, pod, vm] |
| 94 | + staleness: 1s |
| 95 | + sampleRate: 10s |
| 96 | + maxTerminated: 1000 |
| 97 | +---- |
0 commit comments