Skip to content

Commit

Permalink
Merge pull request #21 from wearefrank/openforms2xxllnc
Browse files Browse the repository at this point in the history
Openforms2xxllnc chart
  • Loading branch information
jjansenvr authored Aug 5, 2024
2 parents 11da28f + 0e41a91 commit 290e8b9
Show file tree
Hide file tree
Showing 12 changed files with 2,168 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/openforms2xxllnc/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: ff-common
repository: https://frankframework.github.io/charts/
version: 0.1.23
digest: sha256:e67ce36ad46eb71980444486049c60cca10d0239f08382f443ff0272a3c6276e
generated: "2024-08-02T11:20:30.8207808+02:00"
13 changes: 13 additions & 0 deletions charts/openforms2xxllnc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: openforms2xxllnc
description: A Helm chart for running a Frank! on Kubernetes
version: 1.0.0
appVersion: 1.0.1
type: application
home: https://wearefrank.github.io/openforms2xxllnc
icon: https://raw.githubusercontent.com/wearefrank/charts/master/openforms2xxllnc/icon.svg

dependencies:
- name: ff-common
version: ~0.1.23
repository: https://frankframework.github.io/charts/
283 changes: 283 additions & 0 deletions charts/openforms2xxllnc/README.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions charts/openforms2xxllnc/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions charts/openforms2xxllnc/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ff-common.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "ff-common.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ff-common.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ff-common.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- template "ff-common.configmap.env" (list . "openforms2xxllnc.configmap.env") -}}
{{- define "openforms2xxllnc.configmap.env" -}}
data:
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{/*
ConfigMap for generating MailTemplates.xml
*/}}
{{- if (not .Values.openforms2xxllnc.mailTemplates.existingConfigMap) -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "ff-common.fullname" . }}-mailtemplates
labels:
{{- include "ff-common.labels" . | nindent 4 }}
data:
MailTemplates.xml: |-
<?xml version="1.0" encoding="UTF-8"?>
<root>
{{- range .Values.openforms2xxllnc.mailTemplates.templates }}
<mailTemplates>
<name>{{ .name }}</name>
<subject>{{ .subject }}</subject>
<messageType>{{ .messageType | default "text/html" }}</messageType>
<message>
<![CDATA[
{{- toString .message | nindent 14 }}
]]>
</message>
</mailTemplates>
{{- end }}
</root>
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "ff-common.fullname" . }}-specifics
labels:
{{- include "ff-common.labels" . | nindent 4 }}
data:
{{- with .Values.openforms2xxllnc.connections }}

{{- with .beantwoordVraag }}
openforms2xxllnc.connections.beantwoord-vraag.endpoint: "{{ .endpoint }}"
openforms2xxllnc.connections.beantwoord-vraag.timeout: "{{ .timeout }}"
{{- end }}
{{- with .ontvangAsynchroon }}
openforms2xxllnc.connections.ontvang-asynchroon.endpoint: "{{ .endpoint }}"
openforms2xxllnc.connections.ontvang-asynchroon.timeout: "{{ .timeout }}"
{{- end }}
{{- with .vrijeBerichten }}
openforms2xxllnc.connections.vrije-berichten.endpoint: "{{ .endpoint }}"
openforms2xxllnc.connections.vrije-berichten.timeout: "{{ .timeout }}"
{{- end }}

{{- with .notificatiesApi }}
openforms2xxllnc.connections.notificaties-api.root-url: "{{ .rootUrl }}"
openforms2xxllnc.connections.notificaties-api.timeout: "{{ .timeout }}"
openforms2xxllnc.connections.notificaties-api.auth-type: "{{ .authType }}"
openforms2xxllnc.connections.notificaties-api.auth-alias: "{{ .authAlias }}"
{{- with .subscription }}
openforms2xxllnc.connections.notificaties-api.subscription.callback: "{{ .callback }}"
openforms2xxllnc.connections.notificaties-api.subscription.auth-alias: "{{ .authAlias }}"
{{- with .filters }}
openforms2xxllnc.connections.notificaties-api.subscription.filters.object-type: "{{ .objectType }}"
{{- end }}
{{- end }}
{{- end }}

{{- with .documentenApi }}
openforms2xxllnc.connections.documenten-api.timeout: "{{ .timeout }}"
openforms2xxllnc.connections.documenten-api.auth-type: "{{ .authType }}"
openforms2xxllnc.connections.documenten-api.auth-alias: "{{ .authAlias }}"
{{- end }}

{{- with .objectsApi }}
openforms2xxllnc.connections.objects-api.timeout: "{{ .timeout }}"
openforms2xxllnc.connections.objects-api.auth-type: "{{ .authType }}"
openforms2xxllnc.connections.objects-api.auth-alias: "{{ .authAlias }}"
{{- end }}

{{- with .noReplySmtp }}
openforms2xxllnc.connections.noreply-smtp.enabled: "{{ .enabled }}"
openforms2xxllnc.connections.noreply-smtp.host: "{{ .host }}"
openforms2xxllnc.connections.noreply-smtp.port: "{{ .port }}"
openforms2xxllnc.connections.noreply-smtp.use-ssl: "{{ .useSsl }}"
openforms2xxllnc.connections.noreply-smtp.timeout: "{{ .timeout }}"
openforms2xxllnc.connections.noreply-smtp.auth-alias: "{{ .authAlias }}"
openforms2xxllnc.connections.noreply-smtp.default-from-name: "{{ .defaultFromName }}"
openforms2xxllnc.connections.noreply-smtp.default-from-address: "{{ .defaultFromAddress }}"
openforms2xxllnc.connections.noreply-smtp.signature-from-name: "{{ .signatureFromName | default .defaultFromName }}"
{{- end }}

{{- end }}

{{- with .Values.openforms2xxllnc.workflows }}

{{- with .autoRetries }}
openforms2xxllnc.workflows.auto-retries.enabled: "{{ .enabled }}"
openforms2xxllnc.workflows.auto-retries.cron-expression: "{{ .cronExpression }}"
openforms2xxllnc.workflows.auto-retries.max-retries: "{{ .maxRetries }}"

{{- with .workflowSelector }}
openforms2xxllnc.workflows.auto-retries.workflow-selector.enabled: "{{ .enabled | default "${openforms2xxllnc.workflows.auto-retries.enabled}" }}"
openforms2xxllnc.workflows.auto-retries.workflow-selector.cron-expression: "{{ .cronExpression | default "${openforms2xxllnc.workflows.auto-retries.cron-expression}" }}"
openforms2xxllnc.workflows.auto-retries.workflow-selector.max-retries: "{{ .maxRetries | default "${openforms2xxllnc.workflows.auto-retries.max-retries}" }}"
{{- end }}

{{- with .addDocumentsToCase }}
openforms2xxllnc.workflows.auto-retries.add-documents-to-case.enabled: "{{ .enabled | default "${openforms2xxllnc.workflows.auto-retries.enabled}" }}"
openforms2xxllnc.workflows.auto-retries.add-documents-to-case.cron-expression: "{{ .cronExpression | default "${openforms2xxllnc.workflows.auto-retries.cron-expression}" }}"
openforms2xxllnc.workflows.auto-retries.add-documents-to-case.max-retries: "{{ .maxRetries | default "${openforms2xxllnc.workflows.auto-retries.max-retries}" }}"
{{- end }}

{{- with .sendNoReplyUserEmail }}
openforms2xxllnc.workflows.auto-retries.send-no-reply-user-email.enabled: "{{ .enabled | default "${openforms2xxllnc.workflows.auto-retries.enabled}" }}"
openforms2xxllnc.workflows.auto-retries.send-no-reply-user-email.cron-expression: "{{ .cronExpression | default "${openforms2xxllnc.workflows.auto-retries.cron-expression}" }}"
openforms2xxllnc.workflows.auto-retries.send-no-reply-user-email.max-retries: "{{ .maxRetries | default "${openforms2xxllnc.workflows.auto-retries.max-retries}" }}"
{{- end }}

{{- end }}

{{- with .scheduledStartReceiver }}
openforms2xxllnc.workflows.scheduled-start-receiver.workflow-selector.enabled: "{{ .enabled }}"
openforms2xxllnc.workflows.scheduled-start-receiver.workflow-selector.cron-expression: "{{ .cronExpression }}"
{{- end }}

{{- with .scheduledStopReceiver }}
openforms2xxllnc.workflows.scheduled-stop-receiver.workflow-selector.enabled: "{{ .enabled }}"
openforms2xxllnc.workflows.scheduled-stop-receiver.workflow-selector.cron-expression: "{{ .cronExpression }}"
{{- end }}

{{- with .onErrorActions.onCaseNotFound }}
openforms2xxllnc.workflows.on-error-actions.on-case-not-found.send-mail: "{{ .sendMail }}"
openforms2xxllnc.workflows.on-error-actions.on-case-not-found.template-name: "{{ .templateName }}"
{{- end }}

{{- with .onErrorActions.onSubjectNotEqualsCaseSubject }}
openforms2xxllnc.workflows.on-error-actions.on-subject-not-equals-case-subject.send-mail: "{{ .sendMail }}"
openforms2xxllnc.workflows.on-error-actions.on-subject-not-equals-case-subject.template-name: "{{ .templateName }}"
{{- end }}

{{- end }}
120 changes: 120 additions & 0 deletions charts/openforms2xxllnc/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{{- template "ff-common.deployment" (list . "openforms2xxllnc.deployment") -}}
{{- define "openforms2xxllnc.deployment" -}}
spec:
template:
metadata:
annotations:
checksum/configmap.env: {{ include (print $.Template.BasePath "/configmap.openforms2xxllnc.env.yaml") . | sha256sum }}
checksum/configmap.specifics: {{ include (print $.Template.BasePath "/configmap.openforms2xxllnc.specifics.yaml") . | sha256sum }}
checksum/configmap.mailtemplates: {{ include (print $.Template.BasePath "/configmap.openforms2xxllnc.mailtemplates.yaml") . | sha256sum }}
spec:
containers:
-
{{ include "ff-common.container" (list . "openforms2xxllnc.deployment.container") | nindent 10}}
volumes:
{{- if .Values.securityContext.readOnlyRootFilesystem }}
- name: tmpfs
emptyDir: { }
{{- end }}
{{- if .Values.frank.credentials.secret }}
- name: {{ template "ff-common.fullname" . }}-credentials
secret:
secretName: {{ .Values.frank.credentials.secret }}
{{- end }}
{{- if .Values.frank.security.http.localUsers }}
- name: {{ template "ff-common.fullname" . }}-tomcat-users
configMap:
name: {{ template "ff-common.fullname" . }}-tomcat-users
{{- end }}
{{- if .Values.connections.create }}
- name: {{ template "ff-common.fullname" . }}-context
configMap:
name: {{ template "ff-common.fullname" . }}-context
{{- end }}
{{- if .Values.frank.security.http.activeDirectory.enabled }}
- name: {{ template "ff-common.fullname" . }}-ldap-role-mapping
configMap:
name: {{ template "ff-common.fullname" . }}-ldap-role-mapping
{{- end }}
{{- if .Values.persistence.enabled }}
- name: {{ template "ff-common.fullname" . }}-data
persistentVolumeClaim:
claimName: {{ template "ff-common.fullname" . }}-data
{{- end }}
{{- range $i, $e := .Values.frank.security.certificateStores }}
- name: {{ template "ff-common.fullname" $ }}-certificate-store-{{ $i }}
secret:
secretName: {{ $e.secretName }}
items:
- key: {{ $e.key }}
path: {{ $e.key }}
defaultMode: 0664
{{- end }}
{{- if .Values.openforms2xxllnc.mailTemplates }}
- name: {{ template "ff-common.fullname" . }}-mailtemplates
configMap:
{{- if .Values.openforms2xxllnc.mailTemplates.existingConfigMap }}
name: {{ .Values.openforms2xxllnc.mailTemplates.existingConfigMap }}
{{- else }}
name: {{ template "ff-common.fullname" . }}-mailtemplates
{{- end }}
{{- end -}}
{{- end -}}
{{- define "openforms2xxllnc.deployment.container" -}}
envFrom:
- configMapRef:
name: {{ template "ff-common.fullname" . }}-env
- configMapRef:
name: {{ template "ff-common.fullname" . }}-specifics
volumeMounts:
{{- if .Values.securityContext.readOnlyRootFilesystem }}
- mountPath: /usr/local/tomcat/logs
name: tmpfs
- mountPath: /usr/local/tomcat/conf/Catalina
name: tmpfs
- mountPath: /usr/local/tomcat/work/Catalina/localhost
name: tmpfs
- mountPath: /usr/local/tomcat/temp
name: tmpfs
{{- end }}
{{- if .Values.frank.security.http.localUsers }}
- name: {{ template "ff-common.fullname" . }}-tomcat-users
mountPath: /usr/local/tomcat/conf/tomcat-users.xml
subPath: tomcat-users.xml
readOnly: true
{{- end }}
{{- if .Values.frank.security.http.activeDirectory.enabled }}
- name: {{ template "ff-common.fullname" . }}-ldap-role-mapping
mountPath: /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/ldap-role-mapping.properties
subPath: ldap-role-mapping.properties
readOnly: true
{{- end }}
{{- if .Values.frank.credentials.secret }}
- name: {{ template "ff-common.fullname" . }}-credentials
mountPath: /opt/frank/secrets/
readOnly: true
{{- end }}
{{- if .Values.connections.create }}
- name: {{ template "ff-common.fullname" . }}-context
mountPath: /usr/local/tomcat/conf/Catalina/localhost/ROOT.xml
subPath: context.xml
readOnly: true
{{- end }}
{{- if .Values.persistence.enabled }}
- name: {{ template "ff-common.fullname" . }}-data
subPath: heap-dumps
mountPath: /heap-dumps
{{- end }}
{{- range $i, $e := .Values.frank.security.certificateStores }}
- name: {{ template "ff-common.fullname" $ }}-certificate-store-{{ $i }}
mountPath: /opt/frank/resources/{{ $e.resourceUrl | default $e.key }}
subPath: {{ $e.key }}
readOnly: true
{{- end }}
{{- if .Values.openforms2xxllnc.mailTemplates }}
- name: {{ template "ff-common.fullname" . }}-mailtemplates
mountPath: /opt/frank/resources/MailTemplates.xml
subPath: MailTemplates.xml
readOnly: true
{{- end }}
{{- end -}}
15 changes: 15 additions & 0 deletions charts/openforms2xxllnc/templates/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ template "ff-common.configmap.context.tpl" . }}
---
{{ template "ff-common.configmap.tomcat-users.tpl" . }}
---
{{ template "ff-common.configmap.ldap-role-mapping.tpl" . }}
---
{{ template "ff-common.hpa.tpl"}}
---
{{ template "ff-common.serviceAccount.tpl" . }}
---
{{ template "ff-common.service.tpl" . }}
---
{{ template "ff-common.ingress.tpl" . }}
---
{{ template "ff-common.configmap.k8s-specifics.tpl" . }}
Loading

0 comments on commit 290e8b9

Please sign in to comment.