Skip to content

Commit be7a922

Browse files
gwynnemonahaneromanova97
authored andcommitted
POWERMON-580 0.5 COnfiguring power metrics doc updates
1 parent d26fbad commit be7a922

File tree

4 files changed

+85
-133
lines changed

4 files changed

+85
-133
lines changed

modules/power-monitoring-configuring-kepler-redfish.adoc

Lines changed: 0 additions & 94 deletions
This file was deleted.

modules/power-monitoring-kepler-configuration.adoc

Lines changed: 74 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,92 @@
66
[id="power-monitoring-kepler-configuration_{context}"]
77
= The {PM-kepler} configuration
88

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.
1010

1111
[IMPORTANT]
1212
====
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.
1414
====
1515

1616
The following is the list of configuration options:
1717

18-
.{PM-kepler} configuration options
19-
[options="header"]
18+
.PowerMonitor configuration options
19+
[cols="1,3,2", options="header"]
2020
|===
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+
2561
|===
2662

27-
.Example `{PM-kepler}` resource with default configuration
63+
.Example `PowerMonitor` resource with default configuration
2864
[source,yaml]
2965
----
30-
apiVersion: kepler.system.sustainable.computing.io/v1alpha1
31-
kind: Kepler
66+
apiVersion: v1alpha1
67+
kind: PowerMonitor
3268
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
3474
spec:
35-
exporter:
75+
kepler:
3676
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+
----

modules/power-monitoring-monitoring-kepler-status.adoc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@
66
[id="power-monitoring-monitoring-kepler-status_{context}"]
77
= Monitoring the {PM-kepler} status
88

9-
You can monitor the state of the {PM-kepler} exporter with the `status` field of the `{PM-kepler}` resource.
9+
You can monitor the state of the {PM-kepler} exporter with the `status` field of the `PowerMonitor` resource.
1010

11-
The `status.exporter` field includes information, such as the following:
11+
The `status` field includes information, such as the following:
1212

1313
* The number of nodes currently running the {PM-kepler} pods
1414
* The number of nodes that should be running the {PM-kepler} pods
1515
* Conditions representing the health of the {PM-kepler} resource
1616
17-
This provides you with valuable insights into the changes made through the `spec` field.
17+
This provides you with valuable insights into the changes made through the `spec` field.
1818

19-
.Example state of the `{PM-kepler}` resource
19+
.Example state of the `PowerMonitor` resource
2020
[source,yaml]
2121
----
2222
apiVersion: kepler.system.sustainable.computing.io/v1alpha1
23-
kind: Kepler
23+
kind: PowerMonitor
2424
metadata:
25-
name: kepler
25+
name: power-monitor
2626
status:
27-
exporter:
2827
conditions: # <1>
2928
- lastTransitionTime: '2024-01-11T11:07:39Z'
3029
message: Reconcile succeeded
@@ -34,7 +33,7 @@ status:
3433
type: Reconciled
3534
- lastTransitionTime: '2024-01-11T11:07:39Z'
3635
message: >-
37-
Kepler daemonset "kepler-operator/kepler" is deployed to all nodes and
36+
power-monitor daemonset "openshift-power-monitoring/power-monitor" is deployed to all nodes and
3837
available; ready 2/2
3938
observedGeneration: 1
4039
reason: DaemonSetReady
@@ -43,6 +42,6 @@ status:
4342
currentNumberScheduled: 2 # <2>
4443
desiredNumberScheduled: 2 # <3>
4544
----
46-
<1> The health of the {PM-kepler} resource. In this example, {PM-kepler} is successfully reconciled and ready.
45+
<1> The health of the `PowerMonitor` resource. In this example, the `PowerMonitor` resource is successfully reconciled and ready.
4746
<2> The number of nodes currently running the {PM-kepler} pods is 2.
48-
<3> The wanted number of nodes to run the {PM-kepler} pods is 2.
47+
<3> The wanted number of nodes to run the {PM-kepler} pods is 2.

observability/power_monitoring/configuring-power-monitoring.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ toc::[]
99
:FeatureName: Power monitoring
1010
include::snippets/technology-preview.adoc[leveloffset=+2]
1111

12-
The `{PM-kepler}` resource is a Kubernetes custom resource definition (CRD) that enables you to configure the deployment and monitor the status of the {PM-kepler} resource.
12+
The `PowerMonitor` resource is a Kubernetes custom resource definition (CRD) that enables you to configure the deployment and monitor the status of the `PowerMonitor` resource.
1313

1414
include::modules/power-monitoring-kepler-configuration.adoc[leveloffset=+1]
1515

16-
include::modules/power-monitoring-monitoring-kepler-status.adoc[leveloffset=+1]
17-
18-
include::modules/power-monitoring-configuring-kepler-redfish.adoc[leveloffset=+1]
16+
include::modules/power-monitoring-monitoring-kepler-status.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)