From 4548dc7f2b18ef798fa6d9ad8166ebd7cb6aa050 Mon Sep 17 00:00:00 2001 From: Johannes Darms Date: Thu, 19 Dec 2024 11:50:37 +0100 Subject: [PATCH 1/3] feat(dataverse): Configure solr and postgres via Values (remove hardcoded values) --- k8s/dataverse/Chart.yaml | 2 +- k8s/dataverse/templates/postgres.yaml | 8 +++++--- k8s/dataverse/templates/solr.yaml | 6 +++++- k8s/dataverse/values.yaml | 11 +++++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/k8s/dataverse/Chart.yaml b/k8s/dataverse/Chart.yaml index 59061ff..ed31e74 100644 --- a/k8s/dataverse/Chart.yaml +++ b/k8s/dataverse/Chart.yaml @@ -21,4 +21,4 @@ version: 0.7.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "6.3.0" +appVersion: "6.4.0" diff --git a/k8s/dataverse/templates/postgres.yaml b/k8s/dataverse/templates/postgres.yaml index be316b6..b013bf1 100644 --- a/k8s/dataverse/templates/postgres.yaml +++ b/k8s/dataverse/templates/postgres.yaml @@ -10,14 +10,16 @@ metadata: app.kubernetes.io/component: postgres app.kubernetes.io/part-of: dataverse spec: - enableLogicalBackup: true + enableLogicalBackup: {{ .Values.postgres.logical_backup }} teamId: {{ .Release.Name }} volume: - size: 32Gi - numberOfInstances: 2 + size: {{ .Values.postgres.volume_size }} + numberOfInstances: {{ .Values.postgres.number_instances }}} + {{ if gt (int .Values.postgres.number_instances) 1 }} enableConnectionPooler: true connectionPooler: mode: session + {{ end }} users: dataverse: # database owner - superuser diff --git a/k8s/dataverse/templates/solr.yaml b/k8s/dataverse/templates/solr.yaml index 3a5366f..d651270 100644 --- a/k8s/dataverse/templates/solr.yaml +++ b/k8s/dataverse/templates/solr.yaml @@ -29,7 +29,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 2Gi + storage: {{ .Values.solr.volume_size }} --- apiVersion: v1 kind: PersistentVolumeClaim @@ -106,6 +106,10 @@ spec: value: "0.0.0.0" - name: SOLR_OPTS value: "-Dsolr.jetty.request.header.size=65535" +{{- if .Values.solr.resources }} + resources: + {{ toYaml .Values.solr.resources | indent 10 }} + {{- end }} ports: - containerPort: 8983 volumeMounts: diff --git a/k8s/dataverse/values.yaml b/k8s/dataverse/values.yaml index e449b85..21605f6 100644 --- a/k8s/dataverse/values.yaml +++ b/k8s/dataverse/values.yaml @@ -23,6 +23,17 @@ dataverse: shoulder: base_url: separator: +postgres: + volume_size: "32Gi" + number_instances: 2 + logical_backup: true +solr: + volume_size: "2Gi" + resources: + limits: + memory: "4Gi" + requests: + memory: "1Gi" images: backend: ghcr.io/nfdi4health/csh-ui/dataverse:6.3 configbaker: ghcr.io/nfdi4health/csh-ui/dataverse-baker:6.3 From f46df3e33626d4dd1137c87a31bfb3f05ce27e75 Mon Sep 17 00:00:00 2001 From: Vera Clemens Date: Thu, 19 Dec 2024 12:33:49 +0100 Subject: [PATCH 2/3] chore(k8s.dataverse): update Chart.yaml --- k8s/dataverse/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/dataverse/Chart.yaml b/k8s/dataverse/Chart.yaml index 8a83b06..993d355 100644 --- a/k8s/dataverse/Chart.yaml +++ b/k8s/dataverse/Chart.yaml @@ -15,7 +15,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.9.0 +version: 0.9.1 # 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 From 89af9b9851e4df974f6de27582caebfd1c05065a Mon Sep 17 00:00:00 2001 From: Vera Clemens Date: Thu, 9 Jan 2025 16:19:57 +0100 Subject: [PATCH 3/3] fix(k8s.dataverse): fix bugs in helm templates --- k8s/dataverse/templates/postgres.yaml | 2 +- k8s/dataverse/templates/solr.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/k8s/dataverse/templates/postgres.yaml b/k8s/dataverse/templates/postgres.yaml index b013bf1..e659e35 100644 --- a/k8s/dataverse/templates/postgres.yaml +++ b/k8s/dataverse/templates/postgres.yaml @@ -14,7 +14,7 @@ spec: teamId: {{ .Release.Name }} volume: size: {{ .Values.postgres.volume_size }} - numberOfInstances: {{ .Values.postgres.number_instances }}} + numberOfInstances: {{ int .Values.postgres.number_instances }} {{ if gt (int .Values.postgres.number_instances) 1 }} enableConnectionPooler: true connectionPooler: diff --git a/k8s/dataverse/templates/solr.yaml b/k8s/dataverse/templates/solr.yaml index d651270..a56535c 100644 --- a/k8s/dataverse/templates/solr.yaml +++ b/k8s/dataverse/templates/solr.yaml @@ -106,10 +106,10 @@ spec: value: "0.0.0.0" - name: SOLR_OPTS value: "-Dsolr.jetty.request.header.size=65535" -{{- if .Values.solr.resources }} +{{ if .Values.solr.resources }} resources: - {{ toYaml .Values.solr.resources | indent 10 }} - {{- end }} +{{ toYaml .Values.solr.resources | indent 10 }} +{{ end }} ports: - containerPort: 8983 volumeMounts: