Skip to content

Commit

Permalink
[alertmanager ]fix persistence (prometheus-community#174)
Browse files Browse the repository at this point in the history
* fix persistence

Signed-off-by: André Bauer <monotek23@gmail.com>

* remove blank lines

Signed-off-by: André Bauer <monotek23@gmail.com>

* removed quotes

Signed-off-by: André Bauer <monotek23@gmail.com>

* fix indent

Signed-off-by: André Bauer <monotek23@gmail.com>

* fix access mode indent

Signed-off-by: André Bauer <monotek23@gmail.com>
  • Loading branch information
monotek authored Oct 2, 2020
1 parent 026dbb8 commit 5efe06d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion charts/alertmanager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/a
sources:
- https://github.com/prometheus/alertmanager
type: application
version: 0.1.0
version: 0.1.1
appVersion: v0.21.0
maintainers:
- name: naseemkullah
Expand Down
38 changes: 19 additions & 19 deletions charts/alertmanager/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,26 @@ spec:
- name: config
configMap:
name: {{ include "alertmanager.fullname" . }}
{{- if (not .Values.persistence.enabled) }}
- name: storage
emptyDir: {}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 10 }}
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.persistence.storageClass }}
{{- end }}
{{- end }}
{{- else }}
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 4 }}
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.persistence.storageClass }}
{{- end }}
{{- end }}
- name: storage
emptyDir: {}
{{- end -}}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
4 changes: 2 additions & 2 deletions charts/alertmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tolerations: []
affinity: {}

persistence:
enabled: false
enabled: true
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
Expand All @@ -79,7 +79,7 @@ persistence:
# storageClass: "-"
accessModes:
- ReadWriteOnce
size: 1Gi
size: 50Mi

config:
global: {}
Expand Down

0 comments on commit 5efe06d

Please sign in to comment.