Skip to content

Commit 517cbae

Browse files
committed
feat:[rdkitPostgres]-enable to restore data from
existing claims
1 parent 9d30494 commit 517cbae

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

charts/rdkitCatridgePostgres/Chart.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
apiVersion: v2
22
name: rdkitcatridgepostgres
33
description: A Helm chart for Kubernetes
4+
maintainers:
5+
- name: Nisha Sharma
6+
email: nisha.sharma@uni-jena.de
47

58
# A chart can be either an 'application' or a 'library' chart.
69
#
@@ -15,7 +18,7 @@ type: application
1518
# This is the chart version. This version number should be incremented each time you make changes
1619
# to the chart and its templates, including the app version.
1720
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
21+
version: 0.2.0
1922

2023
# This is the version number of the application being deployed. This version number should be
2124
# incremented each time you make changes to the application. Versions are not expected to

charts/rdkitCatridgePostgres/templates/statefulset.yaml

+13-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ spec:
2727
{{- end }}
2828
securityContext:
2929
{{- toYaml .Values.podSecurityContext | nindent 8 }}
30+
{{- if .Values.persistence.existingClaim }}
31+
volumes:
32+
- name: {{ .Values.volume.name }}
33+
persistentVolumeClaim:
34+
claimName: {{ .Values.persistence.existingClaim }}
35+
{{- end }}
3036
containers:
3137
- name: {{ .Chart.Name }}
3238
securityContext:
@@ -44,11 +50,15 @@ spec:
4450
- name: {{ .Values.volume.name }}
4551
mountPath: {{ .Values.volume.mountpath }}
4652
subPath: postgres
53+
{{- if not .Values.persistence.existingClaim }}
4754
volumeClaimTemplates:
48-
- metadata:
49-
name: {{ .Values.volume.name }}
55+
- apiVersion: v1
56+
kind: PersistentVolumeClaim
57+
metadata:
58+
name: {{ .Values.volume.name }}
5059
spec:
51-
accessModes: [ "ReadWriteOnce" ]
60+
accessModes: [ "ReadWriteOnce" ]
5261
resources:
5362
requests:
5463
storage: {{ .Values.volume.size }}
64+
{{- end }}

charts/rdkitCatridgePostgres/values.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ EnvSecretRef:
4545

4646
auth:
4747
pgPassword: secret
48-
db: test
49-
user: test
48+
db: db
49+
user: user
5050
postgresPassword: secret
5151

5252
ingress:
@@ -81,9 +81,11 @@ volume:
8181
name: postgres-data
8282
mountpath: /var/lib/postgresql/data
8383
size: 5Gi
84-
accessModes: ReadWriteMany
8584
hostPath: /mnt/data
86-
storageClass: standard
85+
86+
## Name of an existing PVC to use.
87+
persistence:
88+
existingClaim:
8789

8890
autoscaling:
8991
enabled: false

0 commit comments

Comments
 (0)