From 77c1ab86c518e6a7ecdd0d38d6b80bc981e5424e Mon Sep 17 00:00:00 2001 From: NishaSharma14 Date: Fri, 10 Nov 2023 11:05:28 +0100 Subject: [PATCH] feat: [nmrxiv-app]-replace postgresql with rdkitcatridge --- charts/nmrxiv-app/Chart.yaml | 11 +++-- charts/nmrxiv-app/templates/configmap.yaml | 17 +++++-- charts/nmrxiv-app/templates/secret.yml | 13 ++++-- charts/nmrxiv-app/values.yaml | 53 +++++++++++++--------- 4 files changed, 59 insertions(+), 35 deletions(-) diff --git a/charts/nmrxiv-app/Chart.yaml b/charts/nmrxiv-app/Chart.yaml index 64e4680..5b0e139 100644 --- a/charts/nmrxiv-app/Chart.yaml +++ b/charts/nmrxiv-app/Chart.yaml @@ -18,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.6.2 +version: 0.6.3 # 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 @@ -27,10 +27,10 @@ version: 0.6.2 appVersion: "1.16.0" dependencies: -- name: postgresql +- name: postgresql # to be removed - deprecated and replaced by rdkitpostgres version: "11.6.14" repository: "https://charts.bitnami.com/bitnami" - condition: database.enabled + condition: postgresql.enabled - name: redis version: "17.6.0" repository: https://charts.bitnami.com/bitnami @@ -43,9 +43,10 @@ dependencies: version: "0.1.44" repository: https://nfdi4chem.github.io/repo-helm-charts condition: meilisearch.enabled -- name: pythonmicroservice +- name: nmrium version: "0.1.0" repository: https://nfdi4chem.github.io/repo-helm-charts -- name: nmrium +- name: rdkitcatridgepostgres version: "0.1.0" repository: https://nfdi4chem.github.io/repo-helm-charts + condition: rdkitcatridgepostgres.enabled diff --git a/charts/nmrxiv-app/templates/configmap.yaml b/charts/nmrxiv-app/templates/configmap.yaml index 0b1cb40..b73600a 100644 --- a/charts/nmrxiv-app/templates/configmap.yaml +++ b/charts/nmrxiv-app/templates/configmap.yaml @@ -23,11 +23,18 @@ data: LOG_LEVEL: {{ .Values.logProperties.logLevel }} #DB Properties - DB_USERNAME: {{ required "A valid Values.postgresql.auth.username entry required!" .Values.postgresql.auth.username }} - DB_CONNECTION: {{ required "A valid .Values.postgresql.connection entry required!" .Values.postgresql.connection }} - DB_HOST: {{ printf "%s-postgresql" .Release.Name | quote }} - DB_PORT: {{ .Values.postgresql.port | default 5432 | quote }} - DB_DATABASE: {{ required "A valid Values.postgresql.auth.database entry required!" .Values.postgresql.auth.database }} + # DB_USERNAME: {{ required "A valid Values.postgresql.auth.username entry required!" .Values.postgresql.auth.username }} + # DB_CONNECTION: {{ required "A valid .Values.postgresql.connection entry required!" .Values.postgresql.connection }} + # DB_HOST: {{ printf "%s-postgresql" .Release.Name | quote }} + # DB_PORT: {{ .Values.postgresql.port | default 5432 | quote }} + # DB_DATABASE: {{ required "A valid Values.postgresql.auth.database entry required!" .Values.postgresql.auth.database }} + +#DB Properties + DB_USERNAME: {{ required "A valid .Values.rdkitcatridgepostgres.auth.user entry required!" .Values.rdkitcatridgepostgres.auth.user }} + DB_CONNECTION: {{ required "A valid .Values.rdkitcatridgepostgres.connection entry required!" .Values.rdkitcatridgepostgres.connection }} + DB_HOST: {{ printf "%s-rdkitcatridgepostgres" .Release.Name | quote }} + DB_PORT: {{ .Values.rdkitcatridgepostgres.port | default 5432 | quote }} + DB_DATABASE: {{ required "A valid .Values.rdkitcatridgepostgres.auth.db entry required!" .Values.rdkitcatridgepostgres.auth.db }} #File Storage Properties {{ if .Values.fileStorage.enabled }} diff --git a/charts/nmrxiv-app/templates/secret.yml b/charts/nmrxiv-app/templates/secret.yml index ac18cd3..db3cd13 100644 --- a/charts/nmrxiv-app/templates/secret.yml +++ b/charts/nmrxiv-app/templates/secret.yml @@ -15,10 +15,15 @@ data: {{- end -}} #DB Secrets - {{- if .Values.postgresql.enabled }} - DB_PASSWORD: {{ required "A valid .Values.postgresql.auth.password entry required!" .Values.postgresql.auth.password |b64enc | quote }} - {{- else if .Values.mysql.enabled }} - DB_PASSWORD: {{ required "A valid .Values.postgresql.auth.password entry required!" .Values.postgresql.auth.password |b64enc | quote }} + # {{- if .Values.postgresql.enabled }} + # DB_PASSWORD: {{ required "A valid .Values.postgresql.auth.password entry required!" .Values.postgresql.auth.password |b64enc | quote }} + # {{- else if .Values.mysql.enabled }} + # DB_PASSWORD: {{ required "A valid .Values.postgresql.auth.password entry required!" .Values.postgresql.auth.password |b64enc | quote }} + # {{- end -}} + + #DB Secrets + {{- if .Values.rdkitcatridgepostgres.enabled }} + DB_PASSWORD: {{ required "A valid .Values.rdkitcatridgepostgres.auth.pgPassword entry required!" .Values.rdkitcatridgepostgres.auth.pgPassword |b64enc | quote }} {{- end -}} #File Storage Secrets diff --git a/charts/nmrxiv-app/values.yaml b/charts/nmrxiv-app/values.yaml index 40bc75f..f1eae52 100644 --- a/charts/nmrxiv-app/values.yaml +++ b/charts/nmrxiv-app/values.yaml @@ -157,30 +157,41 @@ mail: # mailer: smtp # DB properties -postgresql: +# postgresql: +# enabled: true +# # global: +# # storageClass: standard +# connection: pgsql +# primary: +# persistence: +# enabled: false +# existingClaim: '' +# size: 1Gi +# # host: nmrxiv-postgresql +# # port: 5432 +# auth: +# username: pguser +# password: secret +# database: nmrxiv +# postgresPassword: secret +# resources: +# limits: +# cpu: 200m +# memory: 150Mi +# requests: +# cpu: 20m +# memory: 100Mi + +#DB Properties +rdkitcatridgepostgres: enabled: true - # global: - # storageClass: standard - connection: pgsql - primary: - persistence: - enabled: false - existingClaim: '' - size: 1Gi - # host: nmrxiv-postgresql - # port: 5432 auth: - username: pguser - password: secret - database: nmrxiv + pgPassword: secret + db: test + user: test postgresPassword: secret - resources: - limits: - cpu: 200m - memory: 150Mi - requests: - cpu: 20m - memory: 100Mi + connection: pgsql + port: 5432 fileStorage: # Below values are for file storage configuration.