From 253c3e3ec5ff45559c389d59382e5f9760636816 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Wed, 4 Jun 2025 15:56:34 +0200 Subject: [PATCH] The chart lacks support for the setup job path Signed-off-by: Martin Weise <martin.weise@tuwien.ac.at> --- .docs/stylesheets/extra.css | 2 + .docs/stylesheets/extra.css.map | 2 +- dbrepo-storage-service/init/Dockerfile | 3 ++ dbrepo-storage-service/init/init.sh | 8 ++-- helm/dbrepo/Chart.yaml | 4 +- helm/dbrepo/templates/auth-setup-job.yaml | 6 +++ helm/dbrepo/values.yaml | 47 +++++++---------------- 7 files changed, 31 insertions(+), 41 deletions(-) diff --git a/.docs/stylesheets/extra.css b/.docs/stylesheets/extra.css index 31429800ab..2b907c0c08 100644 --- a/.docs/stylesheets/extra.css +++ b/.docs/stylesheets/extra.css @@ -29,3 +29,5 @@ img.img-border { .md-main .md-content a:not(.action-button):not([tabindex]):hover { color: var(--md-primary-fg-color--dark); border-bottom: 2px solid var(--md-primary-fg-color--dark); } + +/*# sourceMappingURL=extra.css.map */ diff --git a/.docs/stylesheets/extra.css.map b/.docs/stylesheets/extra.css.map index c3ef178e38..5c3be11800 100644 --- a/.docs/stylesheets/extra.css.map +++ b/.docs/stylesheets/extra.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAAA;6BAC8B;EAC5B,qBAAqB,CAAC,QAAQ;EAC9B,oBAAoB,CAAC,QAAQ;EAAE,gBAAgB;EAC/C,2BAA2B,CAAC,QAAQ;EAAE,gBAAgB;;AAGxD,8BAA+B;EAC7B,QAAQ,CAAC,IAAI;EACb,qBAAqB,CAAC,uBAAuB;;AAG/C,cAAe;EACb,MAAM,EAAE,iBAAiB;;AAG3B,yCAA0C;EACxC,KAAK,EAAE,gBAAgB;;AAIvB,oGACQ;EACN,KAAK,EAAE,gCAAgC;EACvC,UAAU,EAAE,OAAO;;AAIvB;0DAC2D;EACzD,KAAK,EAAE,0BAA0B;EACjC,aAAa,EAAE,oCAAoC;EAEnD;;kEACQ;IACN,KAAK,EAAE,gCAAgC;IACvC,aAAa,EAAE,0CAA0C;;AAK7D,UAAW;EACT,gBAAgB,EAAE,gCAAgC", +"mappings": "AAAA;6BAC8B;EAC5B,qBAAqB,CAAC,QAAQ;EAC9B,oBAAoB,CAAC,QAAQ;EAAE,gBAAgB;EAC/C,2BAA2B,CAAC,QAAQ;EAAE,gBAAgB;;AAGxD,8BAA+B;EAC7B,QAAQ,CAAC,IAAI;EACb,qBAAqB,CAAC,uBAAuB;;AAG/C,cAAe;EACb,MAAM,EAAE,iBAAiB;;AAG3B,yCAA0C;EACxC,KAAK,EAAE,gBAAgB;;AAIvB,oGACQ;EACN,KAAK,EAAE,gCAAgC;EACvC,UAAU,EAAE,OAAO;;AAIvB;0DAC2D;EACzD,KAAK,EAAE,0BAA0B;EACjC,aAAa,EAAE,oCAAoC;EAEnD;;kEACQ;IACN,KAAK,EAAE,gCAAgC;IACvC,aAAa,EAAE,0CAA0C", "sources": ["extra.scss"], "names": [], "file": "extra.css" diff --git a/dbrepo-storage-service/init/Dockerfile b/dbrepo-storage-service/init/Dockerfile index 7ea74cddf1..9d0ac6e9a3 100644 --- a/dbrepo-storage-service/init/Dockerfile +++ b/dbrepo-storage-service/init/Dockerfile @@ -7,6 +7,9 @@ RUN apk --no-cache add \ WORKDIR /app +RUN mkdir -p /app/config && \ + chown -R 1001:1001 /app/config + RUN mkdir -p /var/log/app/service/storage && \ chown -R 1001:1001 /var/log/app/service/storage diff --git a/dbrepo-storage-service/init/init.sh b/dbrepo-storage-service/init/init.sh index f40712e81b..75a6b30aaa 100644 --- a/dbrepo-storage-service/init/init.sh +++ b/dbrepo-storage-service/init/init.sh @@ -1,5 +1,5 @@ #!/bin/bash -cat << EOF > /app/.s3cfg +cat << EOF > /app/config/.s3cfg access_key = ${S3_ACCESS_KEY_ID} secret_key = ${S3_SECRET_ACCESS_KEY} # Setup endpoint @@ -15,15 +15,15 @@ function log() { } # create bucket -if s3cmd --config=/app/.s3cfg ls | grep -q "s3://${S3_BUCKET}"; then +if s3cmd --config=/app/config/.s3cfg ls | grep -q "s3://${S3_BUCKET}"; then echo "[INFO] Bucket s3://${S3_BUCKET} already exists, skip" log "INFO" "Bucket s3://${S3_BUCKET} already exists, skip" else - if ! s3cmd --config=/app/.s3cfg mb s3://${S3_BUCKET}; then + if ! s3cmd --config=/app/config/.s3cfg mb s3://${S3_BUCKET}; then echo "[ERROR] Failed to create bucket s3://${S3_BUCKET}" log "ERROR" "Failed to create bucket s3://${S3_BUCKET}" fi fi # expire daily -s3cmd --config=/app/.s3cfg expire s3://${S3_BUCKET} --expiry-prefix "" --expiry-days 1 \ No newline at end of file +s3cmd --config=/app/config/.s3cfg expire s3://${S3_BUCKET} --expiry-prefix "" --expiry-days 1 \ No newline at end of file diff --git a/helm/dbrepo/Chart.yaml b/helm/dbrepo/Chart.yaml index d3e3dd4a0b..aa0cb20243 100644 --- a/helm/dbrepo/Chart.yaml +++ b/helm/dbrepo/Chart.yaml @@ -7,8 +7,8 @@ description: Helm Chart for installing DBRepo sources: - https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services type: application -version: "1.9.2" -appVersion: "1.9.2" +version: "1.9.1" +appVersion: "1.9.1" keywords: - dbrepo maintainers: diff --git a/helm/dbrepo/templates/auth-setup-job.yaml b/helm/dbrepo/templates/auth-setup-job.yaml index 9b83684bf5..d12994aab9 100644 --- a/helm/dbrepo/templates/auth-setup-job.yaml +++ b/helm/dbrepo/templates/auth-setup-job.yaml @@ -35,9 +35,15 @@ spec: envFrom: - secretRef: name: auth-service-secret + volumeMounts: + - name: empty-dir + mountPath: /var/log/app/service/auth {{- if .Values.authservice.setupJob.resources }} resources: {{- toYaml .Values.authservice.setupJob.resources | nindent 12 }} {{- else if ne .Values.authservice.setupJob.resourcesPreset "none" }} resources: {{- include "common.resources.preset" (dict "type" .Values.authservice.setupJob.resourcesPreset) | nindent 12 }} {{- end }} + volumes: + - name: empty-dir + emptyDir: { } {{- end }} diff --git a/helm/dbrepo/values.yaml b/helm/dbrepo/values.yaml index 4f0bf29685..d26b21ab00 100644 --- a/helm/dbrepo/values.yaml +++ b/helm/dbrepo/values.yaml @@ -77,7 +77,7 @@ metadatadb: ## @param metadatadb.persistence.enabled Enable persistent storage. enabled: true ## @param metadatadb.replicaCount The number of cluster nodes, should be uneven i.e. 2n+1 - replicaCount: 1 + replicaCount: 3 ## @section Dashboard Database Enable the Dashboard Database. @@ -141,7 +141,7 @@ authservice: setupJob: image: ## @skip authservice.setupJob.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.9.1 ## @param authservice.setupJob.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param authservice.setupJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -213,7 +213,7 @@ datadb: ## @skip datadb.metrics.enabled The Prometheus settings. enabled: true ## @param datadb.replicaCount The number of cluster nodes, should be uneven i.e. 2n+1 - replicaCount: 1 + replicaCount: 3 ## @param datadb.resourcesPreset The container resource preset resourcesPreset: "xlarge" ## @param datadb.initdbScriptsConfigMap The setup data to load into the database on first start. @@ -235,28 +235,9 @@ searchdb: host: search-db ## @param searchdb.port The port for the microservices. port: 9200 - coordinating: - ## @param searchdb.coordinating.resourcesPreset The container resource preset - resourcesPreset: "small" - ## @param searchdb.coordinating.replicaCount The number of pod replicas. - replicaCount: 1 ingest: ## @skip searchdb.ingest.enabled The limited default payload does not require this node type. enabled: false - ## @param searchdb.ingest.resourcesPreset The container resource preset - resourcesPreset: "micro" - ## @param searchdb.ingest.replicaCount The number of pod replicas. - replicaCount: 1 - master: - ## @param searchdb.master.resourcesPreset The container resource preset - resourcesPreset: "small" - ## @param searchdb.master.replicaCount The number of pod replicas. - replicaCount: 1 - data: - ## @param searchdb.data.resourcesPreset The container resource preset - resourcesPreset: "medium" - ## @param searchdb.data.replicaCount The number of pod replicas. - replicaCount: 1 security: ## @skip searchdb.security.enabled enabled: false @@ -410,7 +391,7 @@ brokerservice: - name: logging-config mountPath: /tmp/rabbitmq # irrelevant but needed from bitnami chart ## @param brokerservice.replicaCount The number of replicas. - replicaCount: 1 + replicaCount: 3 ## @section Analyse Service @@ -419,7 +400,7 @@ analyseservice: enabled: true image: ## @skip analyseservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.9.1 ## @param analyseservice.podAnnotations the pod annotations. Evaluated as a template ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: { } @@ -483,7 +464,7 @@ metadataservice: enabled: true image: ## @skip metadataservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.9.1 ## @param metadataservice.podAnnotations the pod annotations. Evaluated as a template ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: { } @@ -583,7 +564,7 @@ dataservice: endpoint: http://data-service image: ## @skip dataservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.9.1 ## @param dataservice.podAnnotations the pod annotations. Evaluated as a template ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: { } @@ -672,7 +653,7 @@ searchservice: endpoint: http://search-service image: ## @skip searchservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.9.1 ## @param searchservice.podAnnotations the pod annotations. Evaluated as a template ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: { } @@ -724,7 +705,7 @@ searchservice: enabled: true image: ## @skip searchservice.setupJob.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.9.1 ## @param searchservice.setupJob.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param searchservice.setupJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -787,7 +768,7 @@ storageservice: enabled: true image: ## @skip storageservice.setupJob.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.9.1 s3: ## @param storageservice.setupJob.s3.endpoint The S3-capable endpoint the microservice connects to. endpoint: http://storage-service-s3:8333 @@ -922,7 +903,7 @@ ui: enabled: true image: ## @skip ui.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.9.1 ## https://stackblitz.com/edit/nuxt-oidc-auth-keygen?file=index.js oidc: ## @param ui.oidc.authSessionSecret This should be a at least 48 characters random string. It is used to encrypt the user session. @@ -1043,7 +1024,7 @@ dashboardservice: enabled: true image: ## @skip dashboardservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.9.1 ## @param dashboardservice.endpoint The endpoint for the microservices. endpoint: http://dashboard-service ## @param dashboardservice.podAnnotations the pod annotations. Evaluated as a template @@ -1098,7 +1079,7 @@ dashboardservice: enabled: true image: ## @skip dashboardservice.setupJob.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service-init:1.9.2 + name: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service-init:1.9.1 ## @param dashboardservice.setupJob.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param dashboardservice.setupJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -1272,8 +1253,6 @@ gatewayservice: extraVolumeMounts: - name: empty-dir mountPath: /var/log/nginx - - name: logging-config - mountPath: /tmp ## @param gatewayservice.replicaCount The number of replicas. replicaCount: 3 -- GitLab