Skip to content

Commit

Permalink
Add support for existing persistance claim (#34)
Browse files Browse the repository at this point in the history
* Add support for existing persistance claim

* Seeder should be able to run in the same zone as the existing volume if needed

* Bump chart to 2.5.0

---------

Co-authored-by: Anatolii Lapytskyi <[email protected]>
Co-authored-by: Oliver Günther <[email protected]>
  • Loading branch information
3 people authored Nov 13, 2023
1 parent 520bef6 commit 1999e5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/openproject/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ home: "https://www.openproject.org/"
icon: "https://www.openproject.org/assets/images/press/openproject-icon-original-color-41055eb6.png"
type: "application"
appVersion: "13"
version: "2.4.0"
version: "2.5.0"
maintainers:
- name: OpenProject
url: https://github.com/opf/helm-charts
Expand Down
2 changes: 2 additions & 0 deletions charts/openproject/templates/persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.persistence.enabled }}
{{- if not .Values.persistence.existingClaim }}
---
apiVersion: "v1"
kind: "PersistentVolumeClaim"
Expand All @@ -20,3 +21,4 @@ spec:
storage: {{ .Values.persistence.size | quote }}
...
{{- end }}
{{- end }}
6 changes: 5 additions & 1 deletion charts/openproject/templates/seeder-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ spec:
securityContext:
{{ omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 | trim }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 | trim }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumes:
- name: "data"
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ include "common.names.fullname" . }}{{- end }}
{{- end }}
initContainers:
- name: check-db-ready
Expand Down
2 changes: 1 addition & 1 deletion charts/openproject/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
{{- if .Values.persistence.enabled }}
- name: "data"
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ include "common.names.fullname" . }}{{- end }}
{{- end }}
initContainers:
- name: wait-for-db
Expand Down

0 comments on commit 1999e5d

Please sign in to comment.