mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[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:
committed by
Sean Knox
parent
b2367e4802
commit
78aca2f027
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
version: 0.5.9
|
||||
version: 0.6.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
{{- if .Values.persistence.enabled }}
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
|
||||
@@ -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
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user