Skip to content

Commit

Permalink
fix(helm): move scripts into initdb as .sql files
Browse files Browse the repository at this point in the history
Signed-off-by: WoodenMaiden <[email protected]>
  • Loading branch information
WoodenMaiden committed Aug 30, 2024
1 parent bc0f7c5 commit 4ff022f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 248 deletions.
16 changes: 15 additions & 1 deletion agrold-javaweb/charts/virtuoso/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.iniFileValues.enabled -}}
{{- $enable := or .Values.iniFileValues.enabled .Values.facetedSearch.enabled (not.Values.serveConductor) -}}
{{- if $enable -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,4 +10,17 @@ data:
{{ join "." (list $section $key) | quote }}: {{ $value | quote }}
{{- end }}
{{- end }}

{{- if not .Values.serveConductor }}
"99999999999999999_disable_conductor.sql": |-
vad_uninstall('conductor/1.00.8852');
{{- end }}

{{- if .Values.facetedSearch.enabled }}
"99999999999999999_enable_faceted.sql": |-
vad_install('/opt/virtuoso-opensource/vad/fct_dav.vad', 0);
{{- if .Values.facetedSearch.enableLabels }}
registry_set('fct_desc_value_labels', '1');
{{- end }}
{{- end }}
{{- end }}
224 changes: 0 additions & 224 deletions agrold-javaweb/charts/virtuoso/templates/scripts.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions agrold-javaweb/charts/virtuoso/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,6 @@ spec:
name: {{ include "sparql.scripts.configMapName" . }}
{{- end }}
containers:
{{- if or (not .Values.serveConductor) .Values.facetedSearch.enabled }}
# Turns out we cannot do this in the /initdb.d because
# it blocks connections to the 1111 port
- name: disable-conductor
image: openlink/virtuoso-opensource-7
tag: 7.2.11
volumeMounts:
- name: disableconductor
mountPath: /mnt
restartPolicy: OnFailure
command:
- /bin/sh
- "-c"
- /mnt/..data/wait-for-it.sh localhost:1111 -t 0 -- /mnt/..data/run_scripts.sh
env:
- name: "DBA_PASSWORD"
valueFrom:
secretKeyRef:
name: {{ include "sparql.secretName" . }}
key: DBAPassword

{{- end }}

- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand Down

0 comments on commit 4ff022f

Please sign in to comment.