Skip to content

Commit

Permalink
[stable/prometheus-blackbox-exporter] add "allowIcmp" setting (helm#2…
Browse files Browse the repository at this point in the history
…0409)

* [stable/prometheus-blackbox-exporter] add "allowIcmp" setting

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [stable/prometheus-blackbox-exporter] minor version bump

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [stable/prometheus-blackbox-exporter] fix NET_RAW capability

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [stable/prometheus-blackbox-exporter] run as root if allowIcmp is set

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [stable/prometheus-blackbox-exporter] document security implications of allowIcmp

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>

* [stable/prometheus-blackbox-exporter] add test values for allowIcmp

Signed-off-by: Alice Sawatzky <alice.sawatzky@farmersedge.ca>
Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
  • Loading branch information
alice-sawatzky authored and Miguel Mingorance committed Aug 28, 2020
1 parent f3bb7e3 commit b3dbe6a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/prometheus-blackbox-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Prometheus Blackbox Exporter
name: prometheus-blackbox-exporter
version: 3.0.1
version: 3.1.0
appVersion: 0.15.1
home: https://github.com/prometheus/blackbox_exporter
sources:
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-blackbox-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The following table lists the configurable parameters of the Blackbox-Exporter c
| `podAnnotations` | annotations to add to each pod | `{}` |
| `podDisruptionBudget` | pod disruption budget | `{}` |
| `priorityClassName` | priority class name | None |
| `allowIcmp` | whether to enable ICMP probes, by giving the pods `CAP_NET_RAW` and running as root | `false` |
| `resources` | pod resource requests & limits | `{}` |
| `restartPolicy` | container restart policy | `Always` |
| `service.annotations` | annotations for the service | `{}` |
Expand Down
1 change: 1 addition & 0 deletions stable/prometheus-blackbox-exporter/ci/icmp-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allowIcmp: true
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem }}
{{- if .Values.allowIcmp }}
capabilities:
add: ["NET_RAW"]
{{- else }}
runAsNonRoot: {{ .Values.runAsNonRoot }}
runAsUser: {{ .Values.runAsUser }}
{{- end }}
args:
{{- if .Values.config }}
- "--config.file=/config/blackbox.yaml"
Expand Down Expand Up @@ -117,4 +122,4 @@ spec:
secret:
secretName: {{ .secretName }}
defaultMode: {{ .defaultMode }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions stable/prometheus-blackbox-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ extraSecretMounts: []
# readOnly: true
# defaultMode: 420

allowIcmp: false

resources: {}
# limits:
# memory: 300Mi
Expand Down

0 comments on commit b3dbe6a

Please sign in to comment.