From c01e54a0c931047690ac78d18dd15444f915c2bb Mon Sep 17 00:00:00 2001 From: Sergi Philipsen Date: Fri, 30 Jun 2023 11:17:16 +0200 Subject: [PATCH] fix: fixiate instance name of ff-test and change instance name to release name in ff-common --- charts/ff-common/Chart.yaml | 2 +- charts/ff-common/templates/_names.tpl | 6 ++++- charts/ff-common/templates/_util.tpl | 6 ++--- charts/ff-test/Chart.lock | 6 ++--- charts/ff-test/Chart.yaml | 4 ++-- charts/ff-test/README.md | 3 +-- .../ff-test/templates/configmap.context.yaml | 24 +++++++++---------- charts/ff-test/templates/configmap.env.yaml | 5 ++++ charts/ff-test/templates/manifest.yaml | 2 -- charts/ff-test/values.schema.json | 12 +--------- charts/ff-test/values.yaml | 5 +--- 11 files changed, 34 insertions(+), 41 deletions(-) create mode 100644 charts/ff-test/templates/configmap.env.yaml diff --git a/charts/ff-common/Chart.yaml b/charts/ff-common/Chart.yaml index 31cdd50..8b1bdc3 100644 --- a/charts/ff-common/Chart.yaml +++ b/charts/ff-common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: ff-common chart building components and helpers for the Frank!Framework name: ff-common -version: 0.1.9 +version: 0.1.10 appVersion: "7.8" home: https://frankframework.org icon: https://raw.githubusercontent.com/ibissource/charts/master/charts/ff-common/icon.svg diff --git a/charts/ff-common/templates/_names.tpl b/charts/ff-common/templates/_names.tpl index 3677280..d130096 100644 --- a/charts/ff-common/templates/_names.tpl +++ b/charts/ff-common/templates/_names.tpl @@ -35,5 +35,9 @@ Create the instance name for the Frank!. Will be set to the fullname unless value is set. */}} {{- define "ff-common.instance.name" -}} -{{ default (include "ff-common.fullname" . ) .Values.frank.instance.name }} +{{- if (hasKey .Values.frank "instance") -}} +{{ default .Release.Name .Values.frank.instance.name }} +{{- else -}} +{{ .Release.Name }} +{{- end -}} {{- end -}} diff --git a/charts/ff-common/templates/_util.tpl b/charts/ff-common/templates/_util.tpl index 4d95add..cf1aac1 100644 --- a/charts/ff-common/templates/_util.tpl +++ b/charts/ff-common/templates/_util.tpl @@ -9,7 +9,7 @@ This takes an array of three values: */}} {{- define "ff-common.util.merge" -}} {{- $top := first . -}} -{{- $overrides := fromYaml (include (index . 1) $top) | default (dict ) -}} -{{- $tpl := fromYaml (include (index . 2) $top) | default (dict ) -}} -{{- toYaml (merge $overrides $tpl) -}} +{{- $tpl := fromYaml (include (index . 1) $top) | default (dict ) -}} +{{- $overrides := fromYaml (include (index . 2) $top) | default (dict ) -}} +{{- toYaml (merge $tpl $overrides) -}} {{- end -}} diff --git a/charts/ff-test/Chart.lock b/charts/ff-test/Chart.lock index 5df6c3d..2154f83 100644 --- a/charts/ff-test/Chart.lock +++ b/charts/ff-test/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: ff-common repository: file://../ff-common - version: 0.1.9 -digest: sha256:3d35b0177f487d60e75e8fb755b7431c8bbde94d7ad447cf39992b1c569e8af1 -generated: "2023-06-19T13:54:52.869571205+02:00" + version: 0.1.10 +digest: sha256:6377597288293762ef910c31c1157278601b87793bf6503f9791eea7e84bc8b7 +generated: "2023-06-30T11:46:15.982788486+02:00" diff --git a/charts/ff-test/Chart.yaml b/charts/ff-test/Chart.yaml index 4828146..f046123 100644 --- a/charts/ff-test/Chart.yaml +++ b/charts/ff-test/Chart.yaml @@ -4,9 +4,9 @@ description: A Helm chart for testing the Frank!Framework on Kubernetes name: ff-test icon: https://raw.githubusercontent.com/ibissource/charts/master/charts/ff-test/icon.svg type: application -version: 0.2.19 +version: 0.2.20 dependencies: - name: ff-common - version: 0.1.x + version: ~0.1.10 repository: file://../ff-common diff --git a/charts/ff-test/README.md b/charts/ff-test/README.md index 7997ec1..028000a 100644 --- a/charts/ff-test/README.md +++ b/charts/ff-test/README.md @@ -53,7 +53,6 @@ To uninstall the chart: | `frank.dtap.side` | Set the `DTAP` side of where the instance is running | `cluster` | | `frank.credentials.secret` | Set the secret name of the existing secret | `""` | | `frank.credentials.key` | Set the key inside the secret that contains the data (e.g. `credentials.properties`) | `""` | -| `frank.instance.name` | Set the name of the Frank! instance (default is the `fullname`) | `""` | | `frank.configurations.names` | Set the configurations to load. Leave empty to use the default | `[]` | | `frank.security.http.authentication` | Set http authentication for the Frank! | `false` | | `frank.security.http.localUsers` | Set localUsers who can log in on the Frank! | `[]` | @@ -80,7 +79,7 @@ To uninstall the chart: | `connections.jdbc` | Set one database connections. The connection should match one in the context.xml | `{}` | | `connections.jdbc.host` | Host of where the database can be reached (like in the same cluster e.g. `..svc.cluster.local`). For H2 it can be `mem` or a file location | `""` | | `connections.jdbc.port` | Port for the database (leave empty for default) | `""` | -| `connections.jdbc.database` | Name of the database to use (default is `.Values.instance.name`) | `""` | +| `connections.jdbc.database` | Name of the database to use (default is `.Release.name`) | `""` | | `connections.jdbc.username` | Username to connect to the database (or use string template for use with credentials e.g. `${database/username}`) | `""` | | `connections.jdbc.password` | Password to connect to the database (or use string template for use with credentials e.g. `${database/password}`) | `""` | | `connections.jdbc.ssl` | Set to `true` is the connection uses SSL, default is `false` | `""` | diff --git a/charts/ff-test/templates/configmap.context.yaml b/charts/ff-test/templates/configmap.context.yaml index f89527c..d96687c 100644 --- a/charts/ff-test/templates/configmap.context.yaml +++ b/charts/ff-test/templates/configmap.context.yaml @@ -22,14 +22,14 @@ data: {{- with .Values.connections.jdbc }} - - - ..svc.cluster.local`). For H2 it can be `mem` or a file location ## @param connections.jdbc.port [nullable,string] Port for the database (leave empty for default) - ## @param connections.jdbc.database [nullable,string] Name of the database to use (default is `.Values.instance.name`) + ## @param connections.jdbc.database [nullable,string] Name of the database to use (default is `.Release.name`) ## @param connections.jdbc.username [string] Username to connect to the database (or use string template for use with credentials e.g. `${database/username}`) ## @param connections.jdbc.password [string] Password to connect to the database (or use string template for use with credentials e.g. `${database/password}`) ## @param connections.jdbc.ssl [nullable,string] Set to `true` is the connection uses SSL, default is `false`