Skip to content

Commit

Permalink
feat: add a yaml properties value
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsens committed Feb 12, 2024
1 parent 1de5202 commit 341edd7
Show file tree
Hide file tree
Showing 29 changed files with 125 additions and 53 deletions.
2 changes: 1 addition & 1 deletion charts/ff-common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ff-common
description: ff-common chart building components and helpers for the Frank!Framework
version: 0.1.22
version: 0.1.23
appVersion: "8.0"
type: library
home: https://frankframework.org
Expand Down
1 change: 1 addition & 0 deletions charts/ff-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Whereas the sub-chart can only be used "as is", the library can be modified in y
| `frank.security.http.activeDirectory.roleMapping.webService` | Map the role for WebService | `""` |
| `frank.security.http.activeDirectory.roleMapping.observer` | Map the role for Observer | `""` |
| `frank.server.transactionManager` | Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, `` | `""` |
| `frank.properties` | Set Yaml properties for configuring the Frank!Framework or configurations | `{}` |
| `frank.environmentVariables` | Set extra environment variables for the Frank! | `{}` |
| `frank.javaOpts` | Append custom options to the `JAVA_OPTS` environment variable for the Frank! | `""` |

Expand Down
1 change: 1 addition & 0 deletions charts/ff-common/templates/_configmap.env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data:
credentialFactory.map.properties: /opt/frank/secrets/{{.Values.frank.credentials.key}}
{{- end }}
helm.release.version: {{ .Chart.Version }}
ADDITIONAL.PROPERTIES.FILE: "DeploymentSpecifics.properties,BuildInfo.properties,ServerSpecifics_${application.server.type}${application.server.type.custom}.properties,SideSpecifics_${dtap.side}.properties,StageSpecifics_${dtap.stage}.properties,K8sSpecifics.yaml,Test.properties"
{{- if .Values.frank.environmentVariables }}
{{- .Values.frank.environmentVariables | toYaml | nindent 2 }}
{{- end }}
Expand Down
17 changes: 17 additions & 0 deletions charts/ff-common/templates/_configmap.k8s-specifics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{/*
ConfigMap for generating a ldap-role-mapping.properties
*/}}
{{- define "ff-common.configmap.k8s-specifics.tpl" -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "ff-common.fullname" . }}-k8s-specifics
labels:
{{- include "ff-common.labels" . | nindent 4 }}
data:
K8sSpecifics.yaml: |-
{{ toYaml .Values.frank.properties | nindent 4 }}
{{- end -}}
{{- define "ff-common.configmap.k8s-specifics" -}}
{{- template "ff-common.util.merge" (append . "ff-common.configmap.k8s-specifics.tpl") -}}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/ff-common/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ volumeMounts:
subPath: {{ $e.key }}
readOnly: true
{{- end }}
- name: {{ template "ff-common.fullname" . }}-k8s-specifics
mountPath: /opt/frank/resources/K8sSpecifics.yaml
subPath: K8sSpecifics.yaml
readOnly: true
ports:
- name: http
containerPort: 8080
Expand Down
4 changes: 4 additions & 0 deletions charts/ff-common/templates/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
checksum/configmap.env: {{ include ("ff-common.configmap.env.tpl") . | sha256sum }}
checksum/configmap.ldap-role-mapping: {{ include ("ff-common.configmap.ldap-role-mapping.tpl") . | sha256sum }}
checksum/configmap.tomcat-users: {{ include ("ff-common.configmap.tomcat-users.tpl") . | sha256sum }}
checksum/configmap.k8s-specifics: {{ include ("ff-common.configmap.k8s-specifics.tpl") . | sha256sum }}
{{ with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{ end }}
Expand Down Expand Up @@ -89,6 +90,9 @@ spec:
path: {{ $e.key }}
defaultMode: 0664
{{- end }}
- name: {{ template "ff-common.fullname" . }}-k8s-specifics
configMap:
name: {{ template "ff-common.fullname" . }}-k8s-specifics
{{- end -}}
{{- define "ff-common.deployment" -}}
{{- template "ff-common.util.merge" (append . "ff-common.deployment.tpl") -}}
Expand Down
5 changes: 5 additions & 0 deletions charts/ff-common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ frank:
## @param frank.server.transactionManager [string] Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, ``
##
transactionManager: NARAYANA
## @param frank.properties [object] Set Yaml properties for configuring the Frank!Framework or configurations
## properties ref: https://github.com/frankframework/frankframework/blob/master/core/src/main/resources/AppConstants.properties
## implementation ref: https://github.com/frankframework/frankframework/blob/master/commons/src/main/java/org/frankframework/util/YamlParser.java
##
properties: {}
## @param frank.environmentVariables [object] Set extra environment variables for the Frank!
##
environmentVariables: {}
Expand Down
6 changes: 3 additions & 3 deletions charts/ff-test/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: ff-common
repository: file://../ff-common
version: 0.1.22
digest: sha256:877ec64cc823b3d224ed82017dfce6f6bb1139aa20355ae51c6039724c76885b
generated: "2024-01-16T15:43:22.436814264+01:00"
version: 0.1.23
digest: sha256:93da2f96818abb707fd6545ac54aa9e97dead870aed57748fc753225f593c4b9
generated: "2024-02-08T17:37:39.66789046+01:00"
4 changes: 2 additions & 2 deletions charts/ff-test/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ff-test
description: A Helm chart for testing the Frank!Framework on Kubernetes
version: 0.2.34
version: 0.2.35
appVersion: "latest-tomcat"
type: application
home: https://frankframework.org
Expand All @@ -12,5 +12,5 @@ keywords:

dependencies:
- name: ff-common
version: ~0.1.22
version: ~0.1.23
repository: file://../ff-common
11 changes: 6 additions & 5 deletions charts/ff-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ helm delete my-ff-test
| `frank.security.http.activeDirectory.enabled` | Enable Active Directory for authentication | `false` |
| `frank.security.http.activeDirectory.url` | Set url for Active Directory | `""` |
| `frank.security.http.activeDirectory.baseDn` | Set baseDn for Active Directory users | `""` |
| `frank.security.http.activeDirectory.roleMapping.tester` | Map the role for Tester | `""` |
| `frank.security.http.activeDirectory.roleMapping.dataAdmin` | Map the role for DataAdmin | `""` |
| `frank.security.http.activeDirectory.roleMapping.admin` | Map the role for Admin | `""` |
| `frank.security.http.activeDirectory.roleMapping.webService` | Map the role for WebService | `""` |
| `frank.security.http.activeDirectory.roleMapping.observer` | Map the role for Observer | `""` |
| `frank.security.http.activeDirectory.roleMapping.tester` | Map the role for Tester | `""` |
| `frank.security.http.activeDirectory.roleMapping.dataAdmin` | Map the role for DataAdmin | `""` |
| `frank.security.http.activeDirectory.roleMapping.admin` | Map the role for Admin | `""` |
| `frank.security.http.activeDirectory.roleMapping.webService` | Map the role for WebService | `""` |
| `frank.security.http.activeDirectory.roleMapping.observer` | Map the role for Observer | `""` |
| `frank.server.transactionManager` | Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, `` | `""` |
| `frank.properties` | Set Yaml properties for configuring the Frank!Framework or configurations | `{}` |
| `frank.environmentVariables` | Set extra environment variables for the Frank! | `{}` |
| `frank.environmentVariables.jdbc.dbms.default` | The default jdbc that will be used. This should match with one of the jdbc's in the context.xml e.g. `postgres-xe` | `""` |
| `frank.environmentVariables.jms.provider.default` | The default jms that will be used. This should match with one of the jms's in the context.xml e.g. `artemis`. `frank.server.transactionManager` needs to be set. | `""` |
Expand Down
4 changes: 4 additions & 0 deletions charts/ff-test/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ volumeMounts:
subPath: {{ $e.key }}
readOnly: true
{{- end }}
- name: {{ template "ff-common.fullname" . }}-k8s-specifics
mountPath: /opt/frank/resources/K8sSpecifics.yaml
subPath: K8sSpecifics.yaml
readOnly: true
startupProbe:
httpGet:
path: /iaf-test/iaf/api/server/health
Expand Down
4 changes: 3 additions & 1 deletion charts/ff-test/templates/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
---
{{ template "ff-common.ingress.tpl" . }}
---
{{ template "ff-common.persistentvolumeclaim.tpl" . }}
{{ template "ff-common.persistentvolumeclaim.tpl" . }}
---
{{ template "ff-common.configmap.k8s-specifics.tpl" . }}
49 changes: 27 additions & 22 deletions charts/ff-test/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,34 @@
}
}
},
"environmentVariables": {
"properties": {
"type": "object",
"properties": {
"management": {
"jdbc": {
"type": "object",
"properties": {
"metrics": {
"dbms": {
"type": "object",
"properties": {
"export": {
"type": "object",
"properties": {
"prometheus": {
"type": "object",
"properties": {
"enabled": {
"type": "string",
"description": "",
"default": "true"
}
}
}
}
"default": {
"type": "string",
"description": "",
"default": "h2"
}
}
}
}
},
"jms": {
"type": "object",
"properties": {
"provider": {
"type": "object",
"properties": {
"default": {
"type": "string",
"description": "",
"default": ""
}
}
}
Expand Down Expand Up @@ -301,11 +306,6 @@
}
}
},
"replicaCount": {
"type": "number",
"description": "Number of Frank!Framework replicas to deploy",
"default": 1
},
"autoscaling": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -336,6 +336,11 @@
}
}
},
"replicaCount": {
"type": "number",
"description": "Number of Frank!Framework replicas to deploy",
"default": 1
},
"startupProbe": {
"type": "object",
"properties": {
Expand Down
12 changes: 8 additions & 4 deletions charts/ff-test/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,19 @@ frank:
## @param frank.server.transactionManager [string] Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, ``
##
transactionManager: ''
## @param frank.properties [object] Set Yaml properties for configuring the Frank!Framework or configurations
## properties ref: https://github.com/frankframework/frankframework/blob/master/core/src/main/resources/AppConstants.properties
## implementation ref: https://github.com/frankframework/frankframework/blob/master/commons/src/main/java/org/frankframework/util/YamlParser.java
##
properties:
jdbc.dbms.default: 'h2'
jms.provider.default: ''
## @param frank.environmentVariables [object] Set extra environment variables for the Frank!
## @param frank.environmentVariables.jdbc.dbms.default [string] The default jdbc that will be used. This should match with one of the jdbc's in the context.xml e.g. `postgres-xe`
## @param frank.environmentVariables.jms.provider.default [string] The default jms that will be used. This should match with one of the jms's in the context.xml e.g. `artemis`. `frank.server.transactionManager` needs to be set.
## More properties can be set. ref: https://github.com/frankframework/iaf/blob/master/test/src/main/resources/DeploymentSpecifics.properties
##
environmentVariables:
jdbc.dbms.default: 'h2'
jms.provider.default: ''
management.metrics.export.prometheus.enabled: "true"
environmentVariables: {}
## @param frank.javaOpts [string] Append custom options to the `JAVA_OPTS` environment variable for the Frank!
##
javaOpts: ""
Expand Down
6 changes: 3 additions & 3 deletions charts/frank2example/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: ff-common
repository: file://../ff-common
version: 0.1.22
digest: sha256:877ec64cc823b3d224ed82017dfce6f6bb1139aa20355ae51c6039724c76885b
generated: "2024-01-16T15:43:34.880606697+01:00"
version: 0.1.23
digest: sha256:93da2f96818abb707fd6545ac54aa9e97dead870aed57748fc753225f593c4b9
generated: "2024-02-08T10:05:40.122626427+01:00"
4 changes: 2 additions & 2 deletions charts/frank2example/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: frank2example
description: A Helm chart for running Frank2Example on Kubernetes
version: 0.2.16
version: 0.2.17
appVersion: "latest"
type: application
home: https://frankframework.org
Expand All @@ -12,5 +12,5 @@ keywords:

dependencies:
- name: ff-common
version: ~0.1.22
version: ~0.1.23
repository: file://../ff-common
1 change: 1 addition & 0 deletions charts/frank2example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ helm delete my-frank2example
| `frank.security.http.activeDirectory.roleMapping.webService` | Map the role for WebService | `""` |
| `frank.security.http.activeDirectory.roleMapping.observer` | Map the role for Observer | `""` |
| `frank.server.transactionManager` | Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, `` | `""` |
| `frank.properties` | Set Yaml properties for configuring the Frank!Framework or configurations | `{}` |
| `frank.environmentVariables` | Set extra environment variables for the Frank! | `{}` |
| `frank.javaOpts` | Append custom options to the `JAVA_OPTS` environment variable for the Frank! | `""` |

Expand Down
2 changes: 2 additions & 0 deletions charts/frank2example/templates/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
{{ template "ff-common.service.tpl" . }}
---
{{ template "ff-common.ingress.tpl" . }}
---
{{ template "ff-common.configmap.k8s-specifics.tpl" . }}
5 changes: 5 additions & 0 deletions charts/frank2example/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ frank:
## @param frank.server.transactionManager [string] Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, ``
##
transactionManager: NARAYANA
## @param frank.properties [object] Set Yaml properties for configuring the Frank!Framework or configurations
## properties ref: https://github.com/frankframework/frankframework/blob/master/core/src/main/resources/AppConstants.properties
## implementation ref: https://github.com/frankframework/frankframework/blob/master/commons/src/main/java/org/frankframework/util/YamlParser.java
##
properties: {}
## @param frank.environmentVariables [object] Set extra environment variables for the Frank!
##
environmentVariables: {}
Expand Down
6 changes: 3 additions & 3 deletions charts/frankframework/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: ff-common
repository: file://../ff-common
version: 0.1.22
digest: sha256:877ec64cc823b3d224ed82017dfce6f6bb1139aa20355ae51c6039724c76885b
generated: "2024-01-16T15:43:47.329177118+01:00"
version: 0.1.23
digest: sha256:93da2f96818abb707fd6545ac54aa9e97dead870aed57748fc753225f593c4b9
generated: "2024-02-08T22:36:29.989302692+01:00"
4 changes: 2 additions & 2 deletions charts/frankframework/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v2
name: frankframework
description: A Helm chart for running the Frank!Framework on Kubernetes
version: 0.2.16
version: 0.2.17
appVersion: "7.8"
type: application
home: https://frankframework.org
icon: https://raw.githubusercontent.com/frankframework/charts/master/charts/frankframework/icon.svg

dependencies:
- name: ff-common
version: ~0.1.22
version: ~0.1.23
repository: file://../ff-common
1 change: 1 addition & 0 deletions charts/frankframework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ helm delete my-frankframework
| `frank.security.http.activeDirectory.roleMapping.webService` | Map the role for WebService | `""` |
| `frank.security.http.activeDirectory.roleMapping.observer` | Map the role for Observer | `""` |
| `frank.server.transactionManager` | Set the transaction manager for Tomcat. Options: `NARAYANA`, `BTM`, `` | `""` |
| `frank.properties` | Set Yaml properties for configuring the Frank!Framework or configurations | `{}` |
| `frank.environmentVariables` | Set extra environment variables for the Frank! | `{}` |
| `frank.javaOpts` | Append custom options to the `JAVA_OPTS` environment variable for the Frank! | `""` |

Expand Down
Loading

0 comments on commit 341edd7

Please sign in to comment.