Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .Values.persistentVolume.selfManaged so PVCs can be managed #120

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion couchdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ required options to set:
A variety of other parameters are also configurable. See the comments in the
`values.yaml` file for further details:


| Parameter | Default |
|--------------------------------------| ------------------------------------------------ |
| `adminUsername` | admin |
Expand All @@ -189,6 +188,7 @@ A variety of other parameters are also configurable. See the comments in the
| `persistentVolume.accessModes` | ReadWriteOnce |
| `persistentVolume.storageClass` | Default for the Kube cluster |
| `persistentVolume.annotations` | {} |
| `persistentVolume.selfManaged` | Set selfManaged to true if you want to provide the chart with existing PVCs created outside of the scope of this helm chart. |
| `persistentVolume.existingClaims` | [] (a list of existing PV/PVC volume value objects with `volumeName`, `claimName`, `persistentVolumeName` and `volumeSource` defined) |
| `persistentVolume.volumeName` | |
| `persistentVolume.claimName` | |
Expand Down
1 change: 1 addition & 0 deletions couchdb/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ A variety of other parameters are also configurable. See the comments in the
| `ingress.tls` | |
| `persistentVolume.accessModes` | ReadWriteOnce |
| `persistentVolume.storageClass` | Default for the Kube cluster |
| `persistentVolume.selfManaged` | Set selfManaged to true if you want to provide the chart with existing PVCs created outside of the scope of this helm chart. |
| `persistentVolume.annotations` | {} |
| `podDisruptionBudget.enabled` | false |
| `podDisruptionBudget.minAvailable` | nil |
Expand Down
2 changes: 1 addition & 1 deletion couchdb/templates/persistentvolume.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.persistentVolume.enabled .Values.persistentVolume.existingClaims -}}
{{- if and (and .Values.persistentVolume.enabled .Values.persistentVolume.existingClaims) (not .Values.persistentVolume.selfManaged) -}}
{{- range $claim := .Values.persistentVolume.existingClaims }}
apiVersion: v1
kind: PersistentVolume
Expand Down
2 changes: 1 addition & 1 deletion couchdb/templates/persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.persistentVolume.enabled .Values.persistentVolume.existingClaims -}}
{{- if and (and .Values.persistentVolume.enabled .Values.persistentVolume.existingClaims) (not .Values.persistentVolume.selfManaged) -}}
{{- $context := . }}
{{- range $claim := .Values.persistentVolume.existingClaims }}
apiVersion: v1
Expand Down
3 changes: 3 additions & 0 deletions couchdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ serviceAccount:
# provisioner.
persistentVolume:
enabled: false
# Set selfManaged to true if you want to provide the chart with existing PVCs created outside of the scope of this helm chart.
# Warning: If you have existing PVCs generated through the helm chart and you set this to true, it will end up deleting the PVCs unless you remove the owner reference of helm from the PVCs/PVs OR if you keep a snapshot/backup and restore yourself.
selfManaged: false
# NOTE: the number of existing claims must match the cluster size
existingClaims: []
annotations: {}
Expand Down