mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/redis] add persistence.existingClaim (#717)
* add persistence.existingClaim to redis * missed the version * cleanup templating
This commit is contained in:
committed by
Adnan Abdulhussein
parent
ed5348c459
commit
f51b89b4f9
@@ -1,5 +1,5 @@
|
||||
name: redis
|
||||
version: 0.4.6
|
||||
version: 0.5.0
|
||||
description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
|
||||
keywords:
|
||||
- redis
|
||||
|
||||
+12
-1
@@ -49,6 +49,7 @@ The following tables lists the configurable parameters of the Redis chart and th
|
||||
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `redisPassword` | Redis password | Randomly generated |
|
||||
| `persistence.enabled` | Use a PVC to persist data | `true` |
|
||||
| `persistence.existingClaim`| Use an existing PVC to persist data | `nil` |
|
||||
| `persistence.storageClass` | Storage class of backing PVC | `generic` |
|
||||
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
@@ -78,4 +79,14 @@ $ helm install --name my-release -f values.yaml stable/redis
|
||||
|
||||
The [Bitnami Redis](https://github.com/bitnami/bitnami-docker-redis) image stores the Redis data and configurations at the `/bitnami/redis` path of the container.
|
||||
|
||||
The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning.
|
||||
By default, the chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning. If a Persistent Volume Claim already exists, specify it during installation.
|
||||
|
||||
### Existing PersistentVolumeClaim
|
||||
|
||||
1. Create the PersistentVolume
|
||||
1. Create the PersistentVolumeClaim
|
||||
1. Install the chart
|
||||
```bash
|
||||
$ helm install --set persistence.existingClaim=PVC_NAME redis
|
||||
```
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
- name: redis-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:
|
||||
|
||||
@@ -19,6 +19,12 @@ imagePullPolicy: IfNotPresent
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## Requires persistence.enabled: 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