Skip to content

Commit

Permalink
Fix multiple configMaps and secrets and extend documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsens committed Sep 26, 2024
1 parent 95856df commit 16473c1
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 43 deletions.
2 changes: 1 addition & 1 deletion charts/frank-console/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: frank-console
description: The Frank!Framework console is a web application that allows you to manage multiple instances of Frank!Framework from a single console.
version: 0.4.0
version: 0.4.1
appVersion: "8.3.0-SNAPSHOT"
type: application
home: https://frankframework.org
Expand Down
7 changes: 5 additions & 2 deletions charts/frank-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ https://hub.docker.com/r/frankframework/frankframework/tags
| Name | Description | Value |
| ------------------- | ------------------------------------------------------------------------------------------ | -------------------------- |
| `image.registry` | Frank!Framework Console image registry | `nexus.frankframework.org` |
| `image.repository` | Frank!Framework Console image repository | `Frank!Framework Console` |
| `image.repository` | Frank!Framework Console image repository | `frank-console` |
| `image.tag` | Frank!Framework Console image tag (immutable tags are recommended) | `""` |
| `image.pullPolicy` | Frank!Framework Console image pull policy | `IfNotPresent` |
| `image.pullPolicy` | Specify a imagePullPolicy | |
Expand Down Expand Up @@ -87,6 +87,9 @@ To deploy the Frank!Framework Console, it can be needed to add some files to the
The Frank!Framework Console chart allows you to generate configmaps and secrets from values.
This is useful if you want to add local users or other authentication to the Frank!Framework Console.

Be sure to set a subPath and a mountPath if you want to avoid conflicts and use multiple secrets.
With one secret, the subPath and mountPath are not needed. And it would be possible to implement items

| Name | Description | Value |
| ------------------------------- | --------------------------------------------------------------------- | ----------- |
| `generateConfigMap` | Generate configmaps from values | `{}` |
Expand Down Expand Up @@ -118,7 +121,7 @@ This is useful if you want to add local users or other authentication to the Fra
### Volumes

The Frank!Framework chart allows you to create and mount volumes to the Frank!Framework.
This is useful if you want to add local users or authentication to the Frank!Framework.
This is useful if you want to add existing local users or authentication to the Frank!Framework.

| Name | Description | Value |
| ------------------- | ----------------------------------------------------------------------------------- | ----- |
Expand Down
4 changes: 2 additions & 2 deletions charts/frank-console/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ volumeMounts:
readOnly: {{ .readOnly | default true }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumeMounts | nindent 2 }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 2 }}
{{- end }}
ports:
- name: hazelcast
Expand Down
3 changes: 2 additions & 1 deletion charts/frank-console/templates/configmap.generate.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- range .Values.generateConfigMap }}
{{- range .Values.generateConfigMap -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,4 +9,5 @@ metadata:
data:
{{- toYaml .data | nindent 2 }}
{{- end }}
---
{{- end -}}
4 changes: 2 additions & 2 deletions charts/frank-console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ spec:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
3 changes: 2 additions & 1 deletion charts/frank-console/templates/secret.generate.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- range .Values.generateSecret }}
{{- range .Values.generateSecret -}}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -14,4 +14,5 @@ data:
stringData:
{{- toYaml .stringData | nindent 2 }}
{{- end }}
---
{{- end -}}
2 changes: 1 addition & 1 deletion charts/frank-console/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"repository": {
"type": "string",
"description": "Frank!Framework Console image repository",
"default": "Frank!Framework Console"
"default": "frank-console"
},
"tag": {
"type": "string",
Expand Down
7 changes: 5 additions & 2 deletions charts/frank-console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fullnameOverride: ""
##
image:
registry: nexus.frankframework.org
repository: Frank!Framework Console
repository: frank-console
tag: ""
## @param image.pullPolicy Frank!Framework Console image pull policy
## @extra image.pullPolicy Specify a imagePullPolicy
Expand Down Expand Up @@ -77,6 +77,9 @@ environmentVariables:
##
## The Frank!Framework Console chart allows you to generate configmaps and secrets from values.
## This is useful if you want to add local users or other authentication to the Frank!Framework Console.
##
## Be sure to set a subPath and a mountPath if you want to avoid conflicts and use multiple secrets.
## With one secret, the subPath and mountPath are not needed. And it would be possible to implement items
## @descriptionEnd
##

Expand Down Expand Up @@ -132,7 +135,7 @@ generateSecret: []
## @section Volumes
## @descriptionStart
## The Frank!Framework chart allows you to create and mount volumes to the Frank!Framework.
## This is useful if you want to add local users or authentication to the Frank!Framework.
## This is useful if you want to add existing local users or authentication to the Frank!Framework.
## @descriptionEnd
##

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: frankframework
repository: file://../frankframework
version: 0.4.0
digest: sha256:a0434a96ffb73917dbf5bd45d8ea9ce75fa93f37e1951e2c3d453df9f32d50d0
generated: "2024-09-19T16:33:03.5432098+02:00"
version: 0.4.1
digest: sha256:2b2938ad3c1966882fc4a469be548159696044133e8b263b29dd899bddb89dc0
generated: "2024-09-26T20:27:29.3484681+02: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.4.0
version: 0.4.1
type: application
home: https://frankframework.org
icon: https://raw.githubusercontent.com/frankframework/charts/master/charts/frank2example/icon.svg
Expand All @@ -11,5 +11,5 @@ keywords:

dependencies:
- name: frankframework
version: 0.4.0
version: 0.4.1
repository: file://../frankframework
2 changes: 0 additions & 2 deletions charts/frank2example/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ frankframework:
##
environmentVariables:
jdbc.datasource.default: "jdbc/frank2example"
credentialFactory.class: "nl.nn.credentialprovider.PropertyFileCredentialFactory"
credentialFactory.map.properties: "/opt/frank/secrets/credentials.properties"

## @skip frankframework.generateSecret
##
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: frank-console
repository: file://../frank-console
version: 0.4.0
digest: sha256:6989807fd93468b7fa75881c55c9b075a6bd095c9eee47ce00e995c7689a834f
generated: "2024-09-23T13:41:10.0473088+02:00"
version: 0.4.1
digest: sha256:7da3645aa0b04383ebfa57ff7811edd291b2b83e740199cee10302a9108905eb
generated: "2024-09-26T20:26:16.6411703+02:00"
4 changes: 2 additions & 2 deletions charts/frankframework/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: frankframework
description: A Helm chart for running the Frank!Framework on Kubernetes
version: 0.4.0
version: 0.4.1
appVersion: "8.3.0-SNAPSHOT"
type: application
home: https://frankframework.org
Expand All @@ -15,7 +15,7 @@ keywords:

dependencies:
- name: frank-console
version: 0.4.0
version: 0.4.1
alias: console
condition: console.enabled
repository: file://../frank-console
49 changes: 36 additions & 13 deletions charts/frankframework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,31 @@ The application parameters are used to configure the Frank!Framework and how it
For example, you can configure the DTAP stage and side of where the instance is running.
You can also configure the name of the instance. And what configurations to load.

| Name | Description | Value |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| `application.dtap.stage` | (Required) Set the `DTAP` stage. Options: `LOC`, `DEV`, `TST`, `ACC`, `PRD` | `""` |
| `application.dtap.stage` | The DTAP stage is used to enable and disable features in the Frank!Framework. | |
| `application.dtap.stage` | ref: https://frank-manual.readthedocs.io/en/latest/deploying/dtapAndProperties.html | |
| `application.dtap.side` | Set the `DTAP` side of where the instance is running, and for sideSpecific properties | `""` |
| `application.instance.name` | Set the name of the Frank! instance (default is the `fullname`) | `""` |
| `application.instance.name` | Keep in mind that the name is used for the default datasource. | |
| `application.configurations.names` | Set the configurations to load. Leave empty to use the default | `[]` |
| `application.configurations.names` | Example is shown in the `values.yaml` file | |
| `application.properties` | Set Yaml properties for configuring the Frank!Framework or configurations | `{}` |
| `application.properties` | ref: https://github.com/frankframework/frankframework/blob/master/core/src/main/resources/AppConstants.properties | |
| `application.properties` | implementation ref: https://github.com/frankframework/frankframework/blob/master/commons/src/main/java/org/frankframework/util/YamlParser.java | |
| Name | Description | Value |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| `application.dtap.stage` | (Required) Set the `DTAP` stage. Options: `LOC`, `DEV`, `TST`, `ACC`, `PRD` | `""` |
| `application.dtap.stage` | The DTAP stage is used to enable and disable features in the Frank!Framework. | |
| `application.dtap.stage` | ref: https://frank-manual.readthedocs.io/en/latest/deploying/dtapAndProperties.html | |
| `application.dtap.side` | Set the `DTAP` side of where the instance is running, and for sideSpecific properties | `""` |
| `application.instance.name` | Set the name of the Frank! instance (default is the `fullname`) | `""` |
| `application.instance.name` | Keep in mind that the name is used for the default datasource. | |
| `application.configurations.names` | Set the configurations to load. Leave empty to use the default | `[]` |
| `application.configurations.names` | Example is shown in the `values.yaml` file | |
| `application.properties` | Set Yaml properties for configuring the Frank!Framework or configurations | `{}` |
| `application.properties` | Please read the section "Environment variables" for more information about the differance between `.Values.application.properties` and `.Values.environmentVariables` | |
| `application.properties` | ref: https://github.com/frankframework/frankframework/blob/master/core/src/main/resources/AppConstants.properties | |
| `application.properties` | implementation ref: https://github.com/frankframework/frankframework/blob/master/commons/src/main/java/org/frankframework/util/YamlParser.java | |

### Environment variables

The environment variables are used to configure the Frank!Framework.

The differance between `.Values.application.properties` and `.Values.environmentVariables` is that the environment variables are set in the container and not in the yaml file.
Environment variables are immediately available in the container and can be used to configure the Frank!Framework, even before the yaml file has been loaded.
The yaml file will is loaded by the Frank!Framework after it has been started.
This is an important differance because it means that some variables to configure the Frank!Framework can not be set in the yaml file.
For example, `jdbc.datasource.default` needs to be set in the container, because it is needed at startup.

To configure credentials you need to add a volume (see section Volumes) and set these environment variables.

```yaml
Expand Down Expand Up @@ -130,6 +137,22 @@ To deploy the Frank!Framework, it can be needed to add some files to the contain
The Frank!Framework chart allows you to generate configmaps and secrets from values.
This is useful if you want to add local users or resources to the Frank!Framework.

Be sure to set a subPath and a mountPath if you want to avoid conflicts and use multiple secrets.
With one secret, the subPath and mountPath are not needed. And it would be possible to implement items, like this:
```yaml
generateSecret:
- name: frankframework-resources
mountPath: "/opt/frank/resources/"
items:
- key: credentials.properties
path: credentials.properties
- key: resources.yml
path: resources.yml
stringData:
credentials.properties: demo
resources.yml: demo
```

The following example will generate a resources.yaml file in the /opt/frank/secrets folder.

```yaml
Expand Down
4 changes: 2 additions & 2 deletions charts/frankframework/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ volumeMounts:
readOnly: {{ .readOnly | default true }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumeMounts | nindent 2 }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 2 }}
{{- end }}
ports:
- name: hazelcast
Expand Down
3 changes: 2 additions & 1 deletion charts/frankframework/templates/configmap.generate.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- range .Values.generateConfigMap }}
{{- range .Values.generateConfigMap -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -9,4 +9,5 @@ metadata:
data:
{{- toYaml .data | nindent 2 }}
{{- end }}
---
{{- end -}}
4 changes: 2 additions & 2 deletions charts/frankframework/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ spec:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
3 changes: 2 additions & 1 deletion charts/frankframework/templates/secret.generate.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- range .Values.generateSecret }}
{{- range .Values.generateSecret -}}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -14,4 +14,5 @@ data:
stringData:
{{- toYaml .stringData | nindent 2 }}
{{- end }}
---
{{- end -}}
23 changes: 23 additions & 0 deletions charts/frankframework/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ application:
configurations:
names: [ ]
## @param application.properties [object] Set Yaml properties for configuring the Frank!Framework or configurations
## @extra application.properties Please read the section "Environment variables" for more information about the differance between `.Values.application.properties` and `.Values.environmentVariables`
## @extra application.properties ref: https://github.com/frankframework/frankframework/blob/master/core/src/main/resources/AppConstants.properties
## @extra application.properties implementation ref: https://github.com/frankframework/frankframework/blob/master/commons/src/main/java/org/frankframework/util/YamlParser.java
##
Expand All @@ -95,6 +96,12 @@ application:
## @descriptionStart
## The environment variables are used to configure the Frank!Framework.
##
## The differance between `.Values.application.properties` and `.Values.environmentVariables` is that the environment variables are set in the container and not in the yaml file.
## Environment variables are immediately available in the container and can be used to configure the Frank!Framework, even before the yaml file has been loaded.
## The yaml file will is loaded by the Frank!Framework after it has been started.
## This is an important differance because it means that some variables to configure the Frank!Framework can not be set in the yaml file.
## For example, `jdbc.datasource.default` needs to be set in the container, because it is needed at startup.
##
## To configure credentials you need to add a volume (see section Volumes) and set these environment variables.
##
## ```yaml
Expand Down Expand Up @@ -127,6 +134,22 @@ environmentVariables:
## The Frank!Framework chart allows you to generate configmaps and secrets from values.
## This is useful if you want to add local users or resources to the Frank!Framework.
##
## Be sure to set a subPath and a mountPath if you want to avoid conflicts and use multiple secrets.
## With one secret, the subPath and mountPath are not needed. And it would be possible to implement items, like this:
## ```yaml
## generateSecret:
## - name: frankframework-resources
## mountPath: "/opt/frank/resources/"
## items:
## - key: credentials.properties
## path: credentials.properties
## - key: resources.yml
## path: resources.yml
## stringData:
## credentials.properties: demo
## resources.yml: demo
## ```
##
## The following example will generate a resources.yaml file in the /opt/frank/secrets folder.
##
## ```yaml
Expand Down

0 comments on commit 16473c1

Please sign in to comment.