Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/prometheus] Add extraHostPathMounts config #862

Merged
merged 2 commits into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stable/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Parameter | Description | Default
`nodeExporter.image.tag` | node-exporter container image tag | `v0.13.0`
`nodeExporter.image.pullPolicy` | node-exporter container image pull policy | `IfNotPresent`
`nodeExporter.extraArgs` | Additional node-exporter container arguments | `{}`
`nodeExporter.extraHostPathMounts` | Additional node-exporter hostPath mounts | `[]`
`nodeExporter.nodeSelector` | node labels for node-exporter pod assignment | `{}`
`nodeExporter.podAnnotations` | annotations to be added to node-exporter pods | `{}`
`nodeExporter.resources` | node-exporter resource requests and limits (YAML) | `{}`
Expand All @@ -117,6 +118,7 @@ Parameter | Description | Default
`server.image.pullPolicy` | Prometheus server container image pull policy | `IfNotPresent`
`server.alertmanagerURL` | (optional) alertmanager URL; only used if alertmanager.enabled = false | `""`
`server.extraArgs` | Additional Prometheus server container arguments | `{}`
`server.extraHostPathMounts` | Additional Prometheus server hostPath mounts | `[]`
`server.ingress.enabled` | If true, Prometheus server Ingress will be created | `false`
`server.ingress.annotations` | Prometheus server Ingress annotations | `[]`
`server.ingress.hosts` | Prometheus server Ingress hostnames | `[]`
Expand Down
10 changes: 10 additions & 0 deletions stable/prometheus/templates/node-exporter-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ spec:
- name: sys
mountPath: /host/sys
readOnly: true
{{- range .Values.nodeExporter.extraHostPathMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
hostNetwork: true
hostPID: true
{{- if .Values.nodeExporter.nodeSelector }}
Expand All @@ -57,4 +62,9 @@ spec:
- name: sys
hostPath:
path: /sys
{{- range .Values.nodeExporter.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
path: {{ .hostPath }}
{{- end }}
{{- end -}}
10 changes: 10 additions & 0 deletions stable/prometheus/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ spec:
- name: storage-volume
mountPath: {{ .Values.alertmanager.persistentVolume.mountPath }}
subPath: "{{ .Values.server.persistentVolume.subPath }}"
{{- range .Values.server.extraHostPathMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.server.nodeSelector }}
nodeSelector:
{{ toYaml .Values.server.nodeSelector | indent 8 }}
Expand All @@ -81,3 +86,8 @@ spec:
{{- else }}
emptyDir: {}
{{- end -}}
{{- range .Values.server.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
path: {{ .hostPath }}
{{- end }}
16 changes: 16 additions & 0 deletions stable/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ nodeExporter:
##
extraArgs: {}

## Additional node-exporter hostPath mounts
##
extraHostPathMounts: []
# - name: textfile-dir
# mountPath: /srv/txt_collector
# hostPath: /var/lib/node-exporter
# readOnly: true

## Node labels for node-exporter pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
Expand Down Expand Up @@ -274,6 +282,14 @@ server:
##
extraArgs: {}

## Additional Prometheus server hostPath mounts
##
extraHostPathMounts: []
# - name: certs-dir
# mountPath: /etc/kubernetes/certs
# hostPath: /etc/kubernetes/certs
# readOnly: true

ingress:
## If true, Prometheus server Ingress will be created
##
Expand Down