Merge "Prometheus: Use volume claims to support RWO storage class"

This commit is contained in:
Zuul 2018-01-30 16:15:29 +00:00 committed by Gerrit Code Review
commit 713ce66963
3 changed files with 14 additions and 39 deletions

View File

@ -1,31 +0,0 @@
{{/*
Copyright 2017 The Openstack-Helm Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.pvc }}
{{- $envAll := . }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Values.storage.pvc.name }}
spec:
accessModes:
- {{ .Values.storage.pvc.access_mode }}
resources:
requests:
storage: {{ .Values.storage.requests.storage }}
storageClassName: {{ .Values.storage.storage_class }}
{{- end }}

View File

@ -158,13 +158,19 @@ spec:
configMap: configMap:
name: prometheus-bin name: prometheus-bin
defaultMode: 0555 defaultMode: 0555
{{- if .Values.storage.enabled }} {{ if $mounts_prometheus.volumes }}{{ toYaml $mounts_prometheus.volumes | indent 8 }}{{ end }}
- name: storage {{- if not .Values.storage.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.storage.pvc.name }}
{{- else }}
- name: storage - name: storage
emptyDir: {} emptyDir: {}
{{- end }} {{- else }}
{{ if $mounts_prometheus.volumes }}{{ toYaml $mounts_prometheus.volumes | indent 8 }}{{ end }} volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes: {{ .Values.storage.pvc.access_mode }}
resources:
requests:
storage: {{ .Values.storage.requests.storage }}
storageClassName: {{ .Values.storage.storage_class }}
{{- end }}
{{- end }} {{- end }}

View File

@ -165,7 +165,7 @@ storage:
enabled: true enabled: true
pvc: pvc:
name: prometheus-pvc name: prometheus-pvc
access_mode: ReadWriteMany access_mode: [ "ReadWriteOnce" ]
requests: requests:
storage: 5Gi storage: 5Gi
storage_class: general storage_class: general