[stable/prometheus] Use volumeMount subPath to fix prometheus-server from crashing (#424)

* Use volumeMount subPath to fix prometheus-server from crashing

* Added persistence.subPath options to server and alertmanager that default to ""

* Fixed variable names in templates.
This commit is contained in:
Ravi Mehra
2017-01-31 18:24:11 -08:00
committed by Adnan Abdulhussein
parent 57e599dd86
commit ffc31993a8
5 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: prometheus
version: 2.0.1
version: 2.0.2
description: A Prometheus Helm chart for Kubernetes. Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
sources:
+2
View File
@@ -57,6 +57,7 @@ The following tables lists the configurable parameters of the Prometheus chart a
| `alertmanager.persistentVolume.existingClaim` | AlertManager data Persistent Volume existing claim name | |
| `alertmanager.persistentVolume.size` | AlertManager data Persistent Volume size | `2Gi` |
| `alertmanager.persistentVolume.storageClass` | AlertManager data Persistent Volume Storage Class | `volume.alpha.kubernetes.io/storage-class: default` |
| `alertmanager.persistentVolume.subPath` | Subdirectory of the volume to mount at | `""` |
| `alertmanager.resources` | Alertmanager resource requests and limits (YAML) |`requests: {cpu: 10m, memory: 32Mi}` |
| `alertmanager.serviceType` | Alertmanager service type | `ClusterIP` |
| `alertmanager.storagePath` | Alertmanager data storage path | `/data` |
@@ -85,6 +86,7 @@ The following tables lists the configurable parameters of the Prometheus chart a
| `server.persistentVolume.existingClaim` | Server data Persistent Volume existing claim name | |
| `server.persistentVolume.size` | Server data Persistent Volume size | `8Gi` |
| `server.persistentVolume.storageClass` | Server data Persistent Volume Storage Class | `volume.alpha.kubernetes.io/storage-class: default` |
| `server.persistentVolume.subPath` | Subdirectory of the volume to mount at | `""` |
| `server.resources` | Server resource requests and limits | `requests: {cpu: 500m, memory: 512Mi}` |
| `server.serviceType` | Server service type | `ClusterIP` |
| `server.storageLocalPath` | Server local data storage path | `/data` |
@@ -39,6 +39,7 @@ spec:
mountPath: /etc/config
- name: storage-volume
mountPath: {{ default "/data" .Values.alertmanager.storagePath | quote }}
subPath: {{ .Values.alertmanager.persistentVolume.subPath }}
- name: {{ template "name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.name }}
image: "{{ .Values.configmapReload.image }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
@@ -59,6 +59,7 @@ spec:
mountPath: /etc/config
- name: storage-volume
mountPath: {{ default "/data" .Values.server.storageLocalPath | quote }}
subPath: {{ .Values.server.persistentVolume.subPath }}
terminationGracePeriodSeconds: {{ default 300 .Values.server.terminationGracePeriodSeconds }}
volumes:
- name: config-volume
+10
View File
@@ -72,6 +72,11 @@ alertmanager:
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
## Subdirectory of the volume to mount at
## Useful if the volume's root directory is not empty
##
subPath: ""
## Alertmanager resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
@@ -227,6 +232,11 @@ server:
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
## Subdirectory of the volume to mount at
## Useful if the volume's root directory is not empty
##
subPath: ""
## Server resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/