mirror of
https://github.com/helm/charts.git
synced 2026-08-22 22:07:36 +00:00
[stable/mysql] Update to the recommended pvc patterns. (#456)
* Convert chart mysql to use the recommended pvc patterns * mysql: fix persistence annotations * mysql: Fix password printing * mysql: Update truncation to 63 * mysql: Add newline after password is printed * mysql: note that default uses alpha storage annotation * Update _helpers.tpl * mysql: Version bump 0.2.4 * Update _helpers.tpl
This commit is contained in:
committed by
Adnan Abdulhussein
parent
278901c999
commit
41cd81e4ad
@@ -1,5 +1,5 @@
|
||||
name: mysql
|
||||
version: 0.2.3
|
||||
version: 0.2.4
|
||||
description: Chart for MySQL
|
||||
keywords:
|
||||
- mysql
|
||||
|
||||
@@ -54,7 +54,7 @@ The following tables lists the configurable parameters of the MySQL chart and th
|
||||
| `mysqlDatabase` | Name for new database to create. | `nil` |
|
||||
| `persistence.enabled` | Create a volume to store data | true |
|
||||
| `persistence.size` | Size of persistent volume claim | 8Gi RW |
|
||||
| `persistence.storageClass` | Type of persistent volume claim | generic |
|
||||
| `persistence.storageClass` | Type of persistent volume claim | nil (uses alpha storage class annotation) |
|
||||
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | ReadWriteOnce |
|
||||
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` |
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ MySQL can be accessed via port 3306 on the following DNS name from within your c
|
||||
|
||||
To get your root password run:
|
||||
|
||||
printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.mysql-root-password[*]}"`);echo
|
||||
kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo
|
||||
|
||||
To connect to your database:
|
||||
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
@@ -9,7 +9,11 @@ metadata:
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
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 }}
|
||||
|
||||
@@ -30,7 +30,10 @@ imagePullPolicy: IfNotPresent
|
||||
## Persist data to a persitent volume
|
||||
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