Skip to content

Commit

Permalink
feat:[rdkitPostgres]-enable to restore data from
Browse files Browse the repository at this point in the history
existing claims
  • Loading branch information
NishaSharma14 committed Feb 1, 2024
1 parent 9d30494 commit 517cbae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
5 changes: 4 additions & 1 deletion charts/rdkitCatridgePostgres/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: v2
name: rdkitcatridgepostgres
description: A Helm chart for Kubernetes
maintainers:
- name: Nisha Sharma
email: nisha.sharma@uni-jena.de

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

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
16 changes: 13 additions & 3 deletions charts/rdkitCatridgePostgres/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.persistence.existingClaim }}
volumes:
- name: {{ .Values.volume.name }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand All @@ -44,11 +50,15 @@ spec:
- name: {{ .Values.volume.name }}
mountPath: {{ .Values.volume.mountpath }}
subPath: postgres
{{- if not .Values.persistence.existingClaim }}
volumeClaimTemplates:
- metadata:
name: {{ .Values.volume.name }}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.volume.name }}
spec:
accessModes: [ "ReadWriteOnce" ]
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.volume.size }}
{{- end }}
10 changes: 6 additions & 4 deletions charts/rdkitCatridgePostgres/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ EnvSecretRef:

auth:
pgPassword: secret
db: test
user: test
db: db
user: user
postgresPassword: secret

ingress:
Expand Down Expand Up @@ -81,9 +81,11 @@ volume:
name: postgres-data
mountpath: /var/lib/postgresql/data
size: 5Gi
accessModes: ReadWriteMany
hostPath: /mnt/data
storageClass: standard

## Name of an existing PVC to use.
persistence:
existingClaim:

autoscaling:
enabled: false
Expand Down

0 comments on commit 517cbae

Please sign in to comment.