E-Mail Conversion
What is the purpose of this Helm chart
This Helm chart provides a jadice flow stack for converting eml files to pdf. It achieves that by disassembling the eml file into its parts, generates a corresponding attachment cover that represents the structure of the email and converts all the parts to pdf and merges the cover and converted parts into one pdf document that represents the pdf representation of this eml file.
Note: This jadice flow Bundle uses ImageMagick Studio LLC to convert Heic/Heif images. For more information see: ImageMagick software
Where to get
After you received the credentials (technical user) for accessing our Helm Chart and Container Registry, you can log in with these credentials at https://artifacts.jadice.com and change your password.
To add a Helm repository to your repositories you can then execute the following commands:
$ helm repo add levigo https://artifacts.jadice.com/repository/helm-charts/ --username <username>
Password: <enter your password>
When you see the password prompt please enter your password.
You now have access to the Helm chart jf-email-conversion
in your helm cli.
There is also the option to download the Helm Chart with the command:
$ helm pull levigo/jf-email-conversion
TL;DR
The only Required Parameters are the container registry credentials in order to access the jadice flow images.
A minimal my-values.yaml with these required parameters would look something like this:
secrets:
imageRegistry:
server: registry.jadice.com
username: myJadiceRegistryUser
password: myJadiceRegistryPassword
To install the chart from the levigo helm repository with the release name my-release
:
$ helm repo add levigo https://artifacts.jadice.com/repository/helm-charts/ --username <username>
Password: <enter your password>
$ helm install --values my-values.yaml my-release levigo/jf-email-conversion
Installation and Configuration
Prerequisites
Kubernetes
- Kubernetes 1.19+
- Helm 3.1.0+
- an Ingress Controller
Storage
- The default storage for storing job results is Eureka. It requires zero configuration for test installations. It's also possible to enabling persistence and configuring other storage backends.
Container Image Access
Because the images used in this chart are from a private container registry you need to have
- access to the container registry
registry.jadice.com
- OR access to a proxy registry of
registry.jadice.com
Installing the Chart
To install the chart with the release name my-release
:
$ helm repo add levigo https://artifacts.jadice.com/repository/helm-charts/ --username <username>
Password: <enter your password>
$ helm install --values values.yaml my-release levigo/jf-email-conversion
The command deploys jf-email-conversion on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Uninstalling the Chart
To uninstall the my-release
deployment:
$ helm uninstall my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Optional: Configure external database
The default database is an embedded H2-Database. If you want to use an existing external database, provide a connection to your database via jf-controller.datasource.jdbcURL
.
## runtime database connection
## On MySQL, add "?createDatabaseIfNotExist=true" to auto-create schema
## (username and password are taken from the values secrets.database.username and secrets.database.password
## or from the kubernetes secret referenced by jf-controller.auth.existingDBSecret)
jf-controller:
datasource:
jdbcUrl: "jdbc:h2:mem:jadice-flow-db;INIT=CREATE SCHEMA IF NOT EXISTS JADICE_FLOW"
Configure external access
If you want access the service from outside the cluster you can define Ingress resources that could look like this:
Ingress Example
jf-controller:
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/configuration-snippet: |
server_tokens off;
location /actuator {
deny all;
return 403;
}
hosts:
- host: jf-controller.acme.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: jf-controller.acme.com
hosts:
- jf-controller.acme.com
You can also create an Ingress for the controller-ui respectively.
Keep in mind this is only an example making certain assumptions. E.g. this assumes you are using Cert Manager and have defined a cluster-issuer with the name of letsencrypt-prod
.
For more information on Cert Manager and how to create a certificate, see Certificate. It also hides the actuator
endpoints from external access. Depending on your monitoring solution this may not be feasible.
Validate Installation
Check that every pod is running and ready
You can check the status of the deployment by checking if all the pods are up and running:
kubectl get pods
This will return something like this:
NAME READY STATUS RESTARTS AGE
jf-controller-5664458f76-ccfk2 2/2 Running 0 158m
jf-controller-ui-7466cbdf4-2clwd 2/2 Running 0 150m
jf-worker-emaildisassembly-8fddf5d5d-x98hs 1/1 Running 0 3h46m
jf-worker-libreoffice-7dcb8fc98b-kdxr4 1/1 Running 0 3h46m
jf-worker-mailbodycreator-7bd667f565-8zqcd 1/1 Running 0 3h46m
jf-worker-topdf-684db89cd-zfqzg 1/1 Running 0 3h46m
jf-worker-xslfo-649ff4bd6b-zk9jh 1/1 Running 0 3h46m
Check functionality with Postman
To validate your deployment you can use the Postman
collection jf-email-conversion.postman_collection.json
that is part of this Helm chart.
You can get it by pulling the Chart with helm pull levigo/jf-email-conversion
. For instructions
on how to import a collection see Importing data into Postman.
After you have imported the collection you need to create a variable JF_CONTROLLER_URL
pointing to your jf-controller
(e.g. https://jf-controller.email.acme.com) and add your access token as a Bearer Token to the collection.
Information about the jadice flow REST-API can be found here.
Troubleshooting
If one or more of the pods stay pending, it could mean that it can not be scheduled onto a node. This can happen if there are not enough resources available. You can check for messages from the scheduler with:
kubectl describe pods <POD_NAME>
If the output of the described command does not provide enough information, you can tail the logs of a pod with this command:
kubectl logs -f <POD_NAME>
Included Workers
- worker-analyzer
- worker-emaildisassembly
- worker-mailbodycreator
- worker-topdf
- worker-libreoffice
- worker-xslfo
- worker-imagemagick - This worker uses ImageMagick Studio LLC to convert Heic/Heif images to PNG
More Information
For more information you check out the Readme.md included in the Helm Chart. You can find the Readme.md in the tgz file that can be downloaded with the command:
helm pull levigo/jf-email-conversion