diff --git a/stable/redmine/README.md b/stable/redmine/README.md index e5b3bd56bb..1081582fa3 100644 --- a/stable/redmine/README.md +++ b/stable/redmine/README.md @@ -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 +``` + diff --git a/stable/redmine/requirements.lock b/stable/redmine/requirements.lock index ecac4aeb8d..14d7a9c809 100644 --- a/stable/redmine/requirements.lock +++ b/stable/redmine/requirements.lock @@ -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 diff --git a/stable/redmine/requirements.yaml b/stable/redmine/requirements.yaml index 89da452cb4..e3e9957df0 100644 --- a/stable/redmine/requirements.yaml +++ b/stable/redmine/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: mariadb - version: 0.5.9 + version: 0.6.0 repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/stable/redmine/templates/NOTES.txt b/stable/redmine/templates/NOTES.txt index c8525c76cd..f1c52e7314 100644 --- a/stable/redmine/templates/NOTES.txt +++ b/stable/redmine/templates/NOTES.txt @@ -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 }} diff --git a/stable/redmine/templates/_helpers.tpl b/stable/redmine/templates/_helpers.tpl index 1e52d321ca..97a634da40 100644 --- a/stable/redmine/templates/_helpers.tpl +++ b/stable/redmine/templates/_helpers.tpl @@ -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 -}} + diff --git a/stable/redmine/templates/deployment.yaml b/stable/redmine/templates/deployment.yaml index 254626bbf5..4a2627d447 100644 --- a/stable/redmine/templates/deployment.yaml +++ b/stable/redmine/templates/deployment.yaml @@ -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 -}} diff --git a/stable/redmine/templates/pvc.yaml b/stable/redmine/templates/pvc.yaml index 6a21fe551b..0136362a7c 100644 --- a/stable/redmine/templates/pvc.yaml +++ b/stable/redmine/templates/pvc.yaml @@ -1,4 +1,4 @@ -{{- if .Values.persistence.enabled }} +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/stable/redmine/values.yaml b/stable/redmine/values.yaml index faac465731..321050f349 100644 --- a/stable/redmine/values.yaml +++ b/stable/redmine/values.yaml @@ -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: ## 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: ## Default: volume.alpha.kubernetes.io/storage-class: default ##