Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/sophora-importer/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: 2.0.1
version: 2.0.2

# 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
6 changes: 3 additions & 3 deletions charts/sophora-importer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Use `s3://` for folders that should be saved in an S3 bucket as configured with

## Import transformation files via S3 or HTTP

Activate transformations with by setting `transformation.enabled` to `true`. Now you can reference one or more zip files via s3 or http
download (use `transformation.data.use` to set your preferred method. Defaults to s3).
By default, all xsl files should be located in `xsl` and all lib files in `libs` inside the .zip file.
Activate transformations with by setting `transformation.enabled` to `true`. Now you can reference one or more zip files to download via s3 or http
or a sidecar-container, containing the files in directories. Use `transformation.data.use` to set your preferred method. Defaults to s3.
By default, all xsl files should be located in `xsl` and all lib files in `libs` inside the .zip file or the sidecar-container
All possible configurations are available in `values.yaml`. Enabling transformations will create
the following directories, that can be accessed within the importer configuration:

Expand Down
35 changes: 31 additions & 4 deletions charts/sophora-importer/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ spec:
initContainers:
{{/* Transformations Download */}}
{{- with .Values.transformation }}
{{- if and .enabled (eq .data.use "s3") }}
{{- if .enabled }}
{{- if eq .data.use "s3" }}
- name: transformation-data-via-s3-downloader
image: "{{ $.Values.downloadViaS3Image.repository }}:{{ $.Values.downloadViaS3Image.tag }}"
imagePullPolicy: {{ $.Values.downloadViaS3Image.pullPolicy }}
Expand Down Expand Up @@ -140,8 +141,7 @@ spec:
mountPath: {{ include "sophora-importer.transformationXslPath" . }}
- name: libs
mountPath: {{ include "sophora-importer.transformationLibsPath" . }}
{{- end }}
{{- if and .enabled (eq .data.use "http") }}
{{- else if eq .data.use "http" }}
- name: transformation-data-via-http-downloader
image: "{{ $.Values.downloadViaS3Image.repository }}:{{ $.Values.downloadViaS3Image.tag }}"
imagePullPolicy: {{ $.Values.downloadViaS3Image.pullPolicy }}
Expand All @@ -167,8 +167,35 @@ spec:
mountPath: {{ include "sophora-importer.transformationXslPath" . }}
- name: libs
mountPath: {{ include "sophora-importer.transformationLibsPath" . }}
{{- else if eq .data.use "sidecar" }}
- name: transformation-data-via-sidecar-copier
image: {{ tpl .data.sidecar.repository $ }}:{{ tpl .data.sidecar.tag $ }}
imagePullPolicy: {{ .data.sidecar.pullPolicy }}
volumeMounts:
- name: xsl
mountPath: {{ include "sophora-importer.transformationXslPath" . }}
- name: libs
mountPath: {{ include "sophora-importer.transformationLibsPath" . }}
env:
- name: XSL_FOLDER
value: {{ default "/xsl" .data.sidecar.folders.xsl }}
- name: LIBS_FOLDER
value: {{ default "/libs" .data.sidecar.folders.libs }}
command: ["/bin/sh"]
args:
- "-c"
- |-
if [ -d "$XSL_FOLDER" ]; then
cp -r "$XSL_FOLDER"/* "{{ include "sophora-importer.transformationXslPath" . }}"
echo "copied xsl files to {{ include "sophora-importer.transformationXslPath" . }}"
fi
if [ -d "$LIBS_FOLDER" ]; then
cp -r "$LIBS_FOLDER"/* "{{ include "sophora-importer.transformationLibsPath" . }}"
echo "copied libs to {{ include "sophora-importer.transformationXslPath" . }}"
fi
{{- end }}
{{- end }}
{{- end }}
{{- end }}
volumes:
- name: importer-config
configMap:
Expand Down
12 changes: 8 additions & 4 deletions charts/sophora-importer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ logbackXml: |
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds">
<jmxConfigurator/>

<appender name="jsonConsoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>

<logger name="com.subshell.sophora" level="INFO"/>
<logger name="com.subshell.sophora.importer" level="INFO"/>
<logger name="org.springframework.boot" level="INFO"/>

<root level="WARN">
<appender-ref ref="jsonConsoleAppender"/>
</root>
Expand All @@ -86,6 +86,11 @@ transformation:
zipPaths:
secretAccessKeyKey: "secretAccessKey"
accessKeyIdKey: "accessKeyId"
sidecar:
pullPolicy: IfNotPresent
folders:
xsl: "/xsl"
libs: "/libs"
useSaxon: false
saxonLicenceSecretName: "saxon-license"
saxonLicenceSecretKey: "saxon-license.lic"
Expand Down Expand Up @@ -115,7 +120,6 @@ ingress:
hosts:
tls: []


# There is the option of setting up the importer container with additionalVolumes and additionalVolumeMounts.
# In this case the volumeMount and the volume must be used together and be configured in the same way (e.g. have the same name).
additionalVolumes:
Expand Down