[stable/redmine] add support for existing PVCs in redmine and mariadb (#719)

* add existing persistent volume claim, for redmine

* cleanup templating

* update dependency

* command did not provide value
This commit is contained in:
Philip Champon
2017-05-03 20:12:59 -07:00
committed by Sean Knox
parent b2367e4802
commit 78aca2f027
8 changed files with 40 additions and 9 deletions
+17 -1
View File
@@ -61,6 +61,7 @@ The following tables lists the configurable parameters of the Redmine chart and
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.existingClaim` | The name of an existing PVC | `nil` |
| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` |
| `persistence.size` | PVC Storage Request | `8Gi` |
@@ -89,5 +90,20 @@ $ helm install --name my-release -f values.yaml stable/redmine
The [Bitnami Redmine](https://github.com/bitnami/bitnami-docker-redmine) image stores the Redmine data and configurations at the `/bitnami/redmine` path of the container.
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube. The volume is created using dynamic volume provisioning. Clusters configured with NFS mounts require manually managed volumes and claims.
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.
### Existing PersistentVolumeClaims
The following example includes two PVCs, one for redmine and another for Maria DB.
1. Create the PersistentVolume
1. Create the PersistentVolumeClaim
1. Create the directory, on a worker
1. Install the chart
```bash
$ helm install --name test --set persistence.existingClaim=PVC_REDMINE,mariadb.persistence.existingClaim=PVC_MARIADB redmine
```
+7 -4
View File
@@ -1,6 +1,9 @@
dependencies:
- name: mariadb
- condition: ""
enabled: false
name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.5.9
digest: sha256:2c911bb44ebae5d8e3d9d69cfb49ce9704cf6cd02bc3583b29fc945e9f213d6a
generated: 2017-02-14T19:54:58.483977446-05:00
tags: null
version: 0.6.0
digest: sha256:b4e89d834d107108f60c64c1c679a10798334ea7bb385a1a55080d802e2a9067
generated: 2017-04-05T14:30:13.450057849-04:00
+1 -1
View File
@@ -1,4 +1,4 @@
dependencies:
- name: mariadb
version: 0.5.9
version: 0.6.0
repository: https://kubernetes-charts.storage.googleapis.com/
+2 -1
View File
@@ -11,7 +11,8 @@
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export SERVICE_IP=$(kubectl get svc {{ template "fullname" . }} --namespace {{ .Release.Namespace }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP/
{{- else if contains "ClusterIP" .Values.serviceType }}
+1
View File
@@ -22,3 +22,4 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- define "mariadb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+1 -1
View File
@@ -74,7 +74,7 @@ spec:
- name: redmine-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
claimName: {{ .Values.persistence.existingClaim | default (include "fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- if .Values.persistence.enabled }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
+10
View File
@@ -52,6 +52,11 @@ mariadb:
##
persistence:
enabled: true
## A manually manage Persistent Volume Claim
## Requires mariadb.persistence.enable: true
## If defined, PVC must be created manually before volume will be bound
# existingClaim:
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
@@ -69,6 +74,11 @@ serviceType: LoadBalancer
##
persistence:
enabled: true
## A manually manage Persistent Volume Claim
## Requires persistence.enable: true
## If defined, PVC must be created manually before volume will be bound
# existingClaim:
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##