Skip to content

Commit

Permalink
Merge pull request #28 from nfdi4health/feat/persona-templating
Browse files Browse the repository at this point in the history
feat(k8s.dataverse): use variable Values.persona for the persona name
  • Loading branch information
johannes-darms committed Sep 3, 2024
2 parents d380fe2 + bff0082 commit 987092b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion k8s/dataverse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.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
Expand Down
2 changes: 1 addition & 1 deletion k8s/dataverse/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ API request are treated by dataverse as they originate from localhost.


## Update SOLR fields with custom metadata info
The `schema.xml` file within the persona nfdi4health contains adaptions for the included custom metadata blocks.
The `schema.xml` file within the persona {{ .Values.persona }} contains adaptions for the included custom metadata blocks.
This means SOLR is configured for the personal out of the box! Once you alter a metadata blocks via the API,
the change must be manually adapted to the solr configuration. The following snippet will walk you through the task:

Expand Down
16 changes: 8 additions & 8 deletions k8s/dataverse/templates/dataverse-baker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
containers:
- image: {{ .Values.images.configbaker}}
name: dataverse-configbaker
command: [ "bootstrap.sh", "-u", "http://{{ .Release.Name }}-dataverse-svc:8080","nfdi4health" ]
command: [ "bootstrap.sh", "-u", "http://{{ .Release.Name }}-dataverse-svc:8080","{{ .Values.persona }}" ]
env:
- name: METADATABLOCKS_PATH
value: "/metadatablocks"
Expand All @@ -51,7 +51,7 @@ spec:
key: username
volumeMounts:
- name: script
mountPath: "/scripts/bootstrap/nfdi4health"
mountPath: "/scripts/bootstrap/{{ .Values.persona }}"
- name: metadatablocks
mountPath: "/metadatablocks"
- name: licence
Expand Down Expand Up @@ -97,42 +97,42 @@ kind: ConfigMap
metadata:
name: {{ .Release.Name }}-dataverse-bootstrap-metadatablocks
data:
{{ (.Files.Glob "persona/nfdi4health/metadatablocks/*").AsConfig | indent 2 }}
{{ (.Files.Glob (print "persona/" .Values.persona "/metadatablocks/*")).AsConfig | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-dataverse-bootstrap-licences
data:
{{ (.Files.Glob "persona/nfdi4health/licence/*").AsConfig | indent 2 }}
{{ (.Files.Glob (print "persona/" .Values.persona "/licence/*")).AsConfig | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-dataverse-bootstrap-dataverses
data:
{{ (.Files.Glob "persona/nfdi4health/dataverses/*").AsConfig | indent 2 }}
{{ (.Files.Glob (print "persona/" .Values.persona "/dataverses/*")).AsConfig | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-dataverse-bootstrap-roles
data:
{{ (.Files.Glob "persona/nfdi4health/roles/*").AsConfig | indent 2 }}
{{ (.Files.Glob (print "persona/" .Values.persona "/roles/*")).AsConfig | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-dataverse-bootstrap-users
data:
{{ (.Files.Glob "persona/nfdi4health/users/*").AsConfig | indent 2 }}
{{ (.Files.Glob (print "persona/" .Values.persona "/users/*")).AsConfig | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-dataverse-bootstrap-configmap
data:
{{ (.Files.Glob "persona/nfdi4health/*").AsConfig | indent 2 }}
{{ (.Files.Glob (print "persona/" .Values.persona "/*")).AsConfig | indent 2 }}
keycloak.json: |
{
"id": "oidc-keycloak",
Expand Down
2 changes: 1 addition & 1 deletion k8s/dataverse/templates/solr-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ metadata:
app.kubernetes.io/part-of: dataverse
data:
schema.xml: >
{{ (.Files.Get "persona/nfdi4health/schema.xml") | indent 4}}
{{ (.Files.Get (print "persona/" .Values.persona "/schema.xml")) | indent 4}}
1 change: 1 addition & 0 deletions k8s/dataverse/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
persona: "nfdi4health"
ingress:
dns:
dataverse:
Expand Down

0 comments on commit 987092b

Please sign in to comment.