Skip to content

Commit e44bff0

Browse files
authored
Merge pull request #391 from CalmaIndustry/fix/add-privileged
fix Could'nt read record from /sys/class
2 parents bd83e3a + 0a5d7b8 commit e44bff0

File tree

7 files changed

+22
-7
lines changed

7 files changed

+22
-7
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ packaging/*/BUILDROOT/*
3535
packaging/*/BUILDROOT/*
3636

3737
.vscode
38-
.vscode/*
38+
.vscode/*

docs_src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
- [JSON exporter](references/exporter-json.md)
3434
- [Prometheus exporter](references/exporter-prometheus.md)
35+
- [Prometheus-push exporter](references/exporter-prometheuspush.md)
3536
- [Qemu exporter](references/exporter-qemu.md)
3637
- [Riemann exporter](references/exporter-riemann.md)
3738
- [Stdout exporter](references/exporter-stdout.md)

docs_src/references/exporter-prometheuspush.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Usage
44

5-
You can launch the prometheus exporter this way (running the default powercap_rapl sensor):
5+
You can launch the prometheus exporter this way:
66

77
scaphandre prometheus-push
88

docs_src/tutorials/installation-windows.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Using the installer
66

7-
Download the [package](https://scaphandre.s3.fr-par.scw.cloud/x86_64/scaphandre_0.5.0_installer.exe) and install it **as an administrator**.
7+
Download the latest exe installer [from the release page](https://github.com/hubblo-org/scaphandre/releases) and install it **as an administrator**.
88

99
### Configuring a Windows service to run Scaphandre in the background
1010

docs_src/tutorials/kubernetes.md

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ to be installed from the source code.
2121
| `serviceMonitor.namespace` | The namespace in which the ServiceMonitor will be created (if not set, default to namespace on which this chart is installed) | `""` |
2222
| `serviceMonitor.interval` | The interval at which metrics should be scraped | `1m` |
2323

24+
25+
#### Security Parameters
26+
27+
| Name | Description | Value |
28+
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | ------------------------- |
29+
| `securityContext.privileged` | Gives full host access, bypassing container isolation (can be needed to run on physical server) | `false` |
30+
| `securityContext.runAsUser` | Run as root user to get proper permissions | `0` |
31+
| `securityContext.runAsGroup` | Run as root group to get proper permissions | `0` |
2432
## Install Prometheus
2533

2634
Next we will install Prometheus which will scrape the metrics generated by Scaphandre.

helm/scaphandre/templates/daemonset.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ spec:
4343
ports:
4444
- name: metrics
4545
containerPort: {{ .Values.port }}
46+
securityContext:
47+
privileged: {{ .Values.securityContext.privileged }}
4648
resources:
4749
{{ toYaml .Values.resources | indent 10 }}
4850
volumeMounts:
@@ -53,8 +55,8 @@ spec:
5355
name: powercap
5456
readOnly: false
5557
securityContext:
56-
runAsUser: {{ .Values.userID }}
57-
runAsGroup: {{ .Values.userGroup }}
58+
runAsUser: {{ .Values.securityContext.userID }}
59+
runAsGroup: {{ .Values.securityContext.userGroup }}
5860
serviceAccountName: {{ template "scaphandre.name" . }}
5961
tolerations:
6062
# Tolerate all taints for observability

helm/scaphandre/values.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ scaphandre:
1818
containers:
1919
# rustBacktrace: '1'
2020

21+
22+
securityContext:
23+
# Gives full host access, bypassing container isolation. true or false
24+
privileged: false
2125
# Run as root user to get proper permissions
22-
userID: 0
23-
groupID: 0
26+
userID: 0
27+
groupID: 0
2428

2529
serviceMonitor:
2630
# Specifies whether ServiceMonitor for Prometheus operator should be created

0 commit comments

Comments
 (0)