diff --git a/charts/rdkitCatridgePostgres/Chart.yaml b/charts/rdkitCatridgePostgres/Chart.yaml index 5ab1389..56918c1 100644 --- a/charts/rdkitCatridgePostgres/Chart.yaml +++ b/charts/rdkitCatridgePostgres/Chart.yaml @@ -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. # @@ -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 diff --git a/charts/rdkitCatridgePostgres/templates/statefulset.yaml b/charts/rdkitCatridgePostgres/templates/statefulset.yaml index 9ebf65f..dab6a37 100644 --- a/charts/rdkitCatridgePostgres/templates/statefulset.yaml +++ b/charts/rdkitCatridgePostgres/templates/statefulset.yaml @@ -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: @@ -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 }} diff --git a/charts/rdkitCatridgePostgres/values.yaml b/charts/rdkitCatridgePostgres/values.yaml index 5697f1e..759e901 100644 --- a/charts/rdkitCatridgePostgres/values.yaml +++ b/charts/rdkitCatridgePostgres/values.yaml @@ -45,8 +45,8 @@ EnvSecretRef: auth: pgPassword: secret - db: test - user: test + db: db + user: user postgresPassword: secret ingress: @@ -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