diff --git a/helm-charts/dbrepo/README.md b/helm-charts/dbrepo/README.md index c57bd14e73dcda70b905eb978f93f1b926704064..bfd84c76f8626453ddafa56e703b5e42f8c64327 100644 --- a/helm-charts/dbrepo/README.md +++ b/helm-charts/dbrepo/README.md @@ -211,11 +211,25 @@ Helm chart. See their documentation for the remaining overridden values. ### User Interface -To replace the placeholder values in -the [`dbrepo.config.json`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-v1.4/dbrepo-ui/dbrepo.config.json) -you need to create a ConfigMap `my-config` and mount the `dbrepo.config.json` into `/app/dbrepo.config.json`: +To replace e.g. the default logo with your organization's logo `my_logo.png`, encode it to +base64 `cat my_logo.png | base64` and create a [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) +under a handy name `my-config`. ```yaml +# my-config.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: my-config +binaryData: + my_logo.png: | + <output from `cat my_logo.png | base64`> +``` + +Then mount it into the container: + +```yaml +# values.yaml ui: extraVolumes: - name: config-map @@ -223,22 +237,23 @@ ui: name: my-config extraVolumeMounts: - name: config-map - mountPath: /dbrepo.config.json - subPath: dbrepo.config.json + mountPath: /app/my_logo.png + subPath: my_logo.png readOnly: true ... ``` -| Name | Description | Value | -|------------------------|----------------------------------------|----------------------------| -| `ui.enabled` | Enables/disabled the deployment. | `enabled` | -| `ui.image.registry` | Registry to pull the image | `s210.dl.hpc.tuwien.ac.at` | -| `ui.image.repository` | Repository to pull the image | `dbrepo/ui` | -| `ui.image.tag` | Tag of the image. | `1.4.1` | -| `ui.image.pullPolicy` | Image pull policy on deployments | `Always` | -| `ui.replicaCount` | Number of replicas for the deployment. | `2` | -| `ui.extraVolumes` | List of extra volumes. | `[]` | -| `ui.extraVolumeMounts` | List of extra volume mounts. | `[]` | +| Name | Description | Value | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------| +| `ui.enabled` | Enables/disabled the deployment. | `enabled` | +| `ui.image.registry` | Registry to pull the image | `s210.dl.hpc.tuwien.ac.at` | +| `ui.image.repository` | Repository to pull the image | `dbrepo/ui` | +| `ui.image.tag` | Tag of the image. | `1.4.1` | +| `ui.image.pullPolicy` | Image pull policy on deployments | `Always` | +| `ui.replicaCount` | Number of replicas for the deployment. | `2` | +| `ui.config` | JSON file containting the configuration of the UI. See [`dbrepo.config.json`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-v1.4/dbrepo-ui/dbrepo.config.json) | `2` | +| `ui.extraVolumes` | List of extra volumes. | `[]` | +| `ui.extraVolumeMounts` | List of extra volume mounts. | `[]` | ## Ingress diff --git a/helm-charts/dbrepo/templates/ui/configmap.yaml b/helm-charts/dbrepo/templates/ui/configmap.yaml index 2307a33b23adb36311d138700fbefc9554ace6ad..dc27bf2f16d6551d3d35b5fe4c96fbd4b57cda81 100644 --- a/helm-charts/dbrepo/templates/ui/configmap.yaml +++ b/helm-charts/dbrepo/templates/ui/configmap.yaml @@ -4,111 +4,8 @@ apiVersion: v1 kind: ConfigMap metadata: name: ui-setup - namespace: {{ $.Values.namespace }} + namespace: {{ .Values.namespace }} data: dbrepo.config.json: | - { - "title": "Database Repository", - "version": "1.4.1", - "ssl": { - "force": false - }, - "logo": { - "path": "/logo.svg" - }, - "icon": { - "path": "/favicon.ico" - }, - "appleTouchIcon": { - "path": "/apple-touch-icon.png" - }, - "api": { - "useSsl": false - }, - "broker": { - "connection": { - "host": "localhost", - "ports": [ - 5672 - ], - "extraInfo": null - } - }, - "storage": { - "endpoint": "storage-service", - "port": 9000, - "useSsl": false, - "accessKey": { - "id": "seaweedfsadmin", - "secret": "seaweedfsadmin" - } - }, - "upload": { - "endpoint": "localhost", - "port": 1080, - "useSsl": false - }, - "database": { - "connection": { - "extraInfo": null - } - }, - "keycloak": { - "client": { - "id": "dbrepo-client", - "secret": "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG" - } - }, - "opensearch": { - "username": "admin", - "password": "admin" - }, - "pid": { - "default": { - "publisher": "Example University" - } - }, - "doi": { - "url": "https://doi.org" - }, - "pages": { - "login": { - "links": [] - }, - "information": { - "links": [ - { - "text": "Online Documentation", - "blank": true, - "href": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/" - }, - { - "text": "Sourcecode Documentation", - "blank": true, - "href": "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services" - }, - { - "text": "Docker Images", - "blank": true, - "href": "https://hub.docker.com/u/dbrepo" - }, - { - "text": "Demo Instance (Kubernetes)", - "blank": true, - "href": "https://test.dbrepo.tuwien.ac.at/" - }, - { - "text": "Pilot Instance (Docker Compose)", - "blank": true, - "href": "https://dbrepo1.ec.tuwien.ac.at/" - }, - { - "text": "Paper", - "blank": true, - "href": "https://doi.org/10.2218/ijdc.v17i1.825" - } - ] - } - } - } + {{ .Values.ui.config | nindent 4 }} {{- end }} \ No newline at end of file diff --git a/helm-charts/dbrepo/values.yaml b/helm-charts/dbrepo/values.yaml index 22a68cee6c967f7e3a3d69954378c13090ec57ef..7487dbbb35c8d7aaa3defd3d78cb48e271a6ead2 100644 --- a/helm-charts/dbrepo/values.yaml +++ b/helm-charts/dbrepo/values.yaml @@ -469,6 +469,111 @@ ui: tag: "1.4.1" pullPolicy: Always replicaCount: 2 + config: | + { + "title": "Database Repository", + "version": "1.4.1", + "ssl": { + "force": false + }, + "logo": { + "path": "/logo.svg" + }, + "icon": { + "path": "/favicon.ico" + }, + "appleTouchIcon": { + "path": "/apple-touch-icon.png" + }, + "api": { + "useSsl": false + }, + "broker": { + "connection": { + "host": "localhost", + "ports": [ + 5672 + ], + "extraInfo": null + } + }, + "storage": { + "endpoint": "storage-service", + "port": 9000, + "useSsl": false, + "accessKey": { + "id": "seaweedfsadmin", + "secret": "seaweedfsadmin" + } + }, + "upload": { + "endpoint": "localhost", + "port": 1080, + "useSsl": false + }, + "database": { + "connection": { + "extraInfo": null + } + }, + "keycloak": { + "client": { + "id": "dbrepo-client", + "secret": "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG" + } + }, + "opensearch": { + "username": "admin", + "password": "admin" + }, + "pid": { + "default": { + "publisher": "Example University" + } + }, + "doi": { + "url": "https://doi.org" + }, + "pages": { + "login": { + "links": [ ] + }, + "information": { + "links": [ + { + "text": "Online Documentation", + "blank": true, + "href": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/" + }, + { + "text": "Sourcecode Documentation", + "blank": true, + "href": "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services" + }, + { + "text": "Docker Images", + "blank": true, + "href": "https://hub.docker.com/u/dbrepo" + }, + { + "text": "Demo Instance (Kubernetes)", + "blank": true, + "href": "https://test.dbrepo.tuwien.ac.at/" + }, + { + "text": "Pilot Instance (Docker Compose)", + "blank": true, + "href": "https://dbrepo1.ec.tuwien.ac.at/" + }, + { + "text": "Paper", + "blank": true, + "href": "https://doi.org/10.2218/ijdc.v17i1.825" + } + ] + } + } + } extraVolumes: [ ] # - name: images-map # configMap: