mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/mongodb] Update to the recommended pvc patterns. (#455)
* Convert chart mongodb to use the recommended pvc patterns * truncate to 63 and trim trailing dashes * remove annotations and fix trunc in apache pvc * document alpha storage class fallback * bump version
This commit is contained in:
committed by
Adnan Abdulhussein
parent
4d3f641a61
commit
ee334ec76e
@@ -1,5 +1,5 @@
|
||||
name: mongodb
|
||||
version: 0.4.4
|
||||
version: 0.4.5
|
||||
description: Chart for MongoDB
|
||||
keywords:
|
||||
- mongodb
|
||||
|
||||
@@ -52,7 +52,7 @@ The following tables lists the configurable parameters of the MongoDB chart and
|
||||
| `mongodbPassword` | MongoDB custom user password | `nil` |
|
||||
| `mongodbDatabase` | Database to create | `nil` |
|
||||
| `persistence.enabled` | Use a PVC to persist data | `true` |
|
||||
| `persistence.storageClass` | Storage class of backing PVC | `generic` |
|
||||
| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -4,7 +4,11 @@ apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
|
||||
{{- else }}
|
||||
volume.alpha.kubernetes.io/storage-class: default
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
|
||||
@@ -26,7 +26,10 @@ image: bitnami/mongodb:3.4.1-r2
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: generic
|
||||
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
|
||||
## Default: volume.alpha.kubernetes.io/storage-class: default
|
||||
##
|
||||
# storageClass:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 8Gi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user