Skip to content

Commit

Permalink
Merge #152
Browse files Browse the repository at this point in the history
152: Add posibility to use an existing persistence claim r=alallema a=nlamirault

# Pull Request

## Related issue
Fixes #82

## What does this PR do?
- ...

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Nicolas Lamirault <[email protected]>
Co-authored-by: Amélie <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2023
2 parents 258704d + 3322b29 commit a393862
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/meilisearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "v0.30.0"
description: A Helm chart for the Meilisearch search engine
name: meilisearch
version: 0.1.46
version: 0.1.47
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
home: https://github.com/meilisearch/meilisearch-kubernetes/charts
maintainers:
Expand Down
2 changes: 2 additions & 0 deletions charts/meilisearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ helm uninstall <your-service-name>
| | |
| `persistence.enabled` | Enable persistence using PVC | `false`
| | |
| `persistence.existingClaim` | Existing PVC | `false`
| | |
| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce`
| | |
| `persistence.storageClass` | PVC Storage Class | `-` (No storage class)
Expand Down
2 changes: 2 additions & 0 deletions charts/meilisearch/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.persistence.enabled }}
{{- if not .Values.persistence.existingClaim -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Expand All @@ -23,3 +24,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/meilisearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
{{- if .Values.persistence.enabled }}
- name: {{ .Values.persistence.volume.name }}
persistentVolumeClaim:
claimName: {{ include "meilisearch.fullname" . }}
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ include "meilisearch.fullname" . }}{{- end }}
{{- end }}
{{- if .Values.volumes }}
{{ toYaml .Values.volumes | indent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/meilisearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ persistence:
## GKE, AWS & OpenStack)
##
# storageClass: "-"

## Data Persistent Volume existing claim name
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
existingClaim: ""
size: 10Gi
annotations: {}
volume:
Expand Down

0 comments on commit a393862

Please sign in to comment.