From 3241af8e26890ceada3e493bd64afe69473db80f Mon Sep 17 00:00:00 2001 From: Sergi Philipsen Date: Mon, 2 Sep 2024 11:20:11 +0200 Subject: [PATCH] add hazelcast network --- charts/frank-console/Chart.yaml | 2 +- charts/frank-console/README.md | 3 +- .../frank-console/templates/_container.yaml | 10 +++++-- .../templates/configmap.env.yaml | 4 +++ .../frank-console/templates/deployment.yaml | 5 +++- charts/frank-console/values.schema.json | 8 ------ charts/frank-console/values.yaml | 5 +++- charts/frank2example/Chart.lock | 6 ++-- charts/frank2example/Chart.yaml | 4 +-- charts/frank2example/README.md | 28 ++++++++++--------- charts/frank2example/values.schema.json | 4 +-- charts/frank2example/values.yaml | 8 ++++-- charts/frankframework/Chart.lock | 6 ++-- charts/frankframework/Chart.yaml | 4 +-- .../frankframework/templates/_container.yaml | 12 ++++++-- .../templates/configmap.env.yaml | 1 + .../configmap.hazelcast-network.yaml | 26 +++++++++++++++++ .../frankframework/templates/deployment.yaml | 5 ++++ .../templates/service.hazelcast.yaml | 17 +++++++++++ 19 files changed, 113 insertions(+), 45 deletions(-) create mode 100644 charts/frankframework/templates/configmap.hazelcast-network.yaml create mode 100644 charts/frankframework/templates/service.hazelcast.yaml diff --git a/charts/frank-console/Chart.yaml b/charts/frank-console/Chart.yaml index 1250e30..e8428bd 100644 --- a/charts/frank-console/Chart.yaml +++ b/charts/frank-console/Chart.yaml @@ -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.1.1 +version: 0.1.2 appVersion: "8.3.0-SNAPSHOT" type: application home: https://frankframework.org diff --git a/charts/frank-console/README.md b/charts/frank-console/README.md index eecea34..027e682 100644 --- a/charts/frank-console/README.md +++ b/charts/frank-console/README.md @@ -75,6 +75,7 @@ https://hub.docker.com/r/frankframework/frankframework/tags | `application.security.http.activeDirectory.roleMapping.admin` | Map the role for Admin | `""` | | `application.security.http.activeDirectory.roleMapping.webService` | Map the role for WebService | `""` | | `application.security.http.activeDirectory.roleMapping.observer` | Map the role for Observer | `""` | +| `application.environmentVariables` | Set extra environment variables for the Frank! | `{}` | | `application.javaOpts` | Append custom options to the `JAVA_OPTS` environment variable for the Frank! | `""` | ### frank-console deployment parameters @@ -114,7 +115,7 @@ The readiness probe will check if all adapters are running using the server heal | `ingress.hosts.paths` | Set multiple paths | `undefined` | | `ingress.hosts.paths.path` | Set path (context url) | `undefined` | | `ingress.hosts.paths.pathType` | Set type of path | `undefined` | -| `ingress.tls` | Define tls secrets for hosts | `[]` | +| `ingress.tls` | Define tls secrets for hosts | `{}` | ### Other Parameters diff --git a/charts/frank-console/templates/_container.yaml b/charts/frank-console/templates/_container.yaml index e9ec402..fd09f57 100644 --- a/charts/frank-console/templates/_container.yaml +++ b/charts/frank-console/templates/_container.yaml @@ -34,16 +34,20 @@ volumeMounts: subPath: {{ $e.key }} readOnly: true {{- end }} + - name: {{ template "frank-console.fullname" . }}-hazelcast-network + mountPath: /app/hazelcast-network.xml + subPath: hazelcast-network.xml + readOnly: true ports: + - name: hazelcast + containerPort: 5701 + protocol: TCP - name: http containerPort: 8080 protocol: TCP - name: https containerPort: 8443 protocol: TCP - - name: hazelcast - containerPort: 5701 - protocol: TCP - name: multicast containerPort: 54327 protocol: TCP diff --git a/charts/frank-console/templates/configmap.env.yaml b/charts/frank-console/templates/configmap.env.yaml index a513742..8ae596b 100644 --- a/charts/frank-console/templates/configmap.env.yaml +++ b/charts/frank-console/templates/configmap.env.yaml @@ -9,6 +9,7 @@ metadata: {{- include "frank-console.labels" . | nindent 4 }} data: management.gateway.outbound.class: "org.frankframework.management.gateway.HazelcastOutboundGateway" + hazelcast.network.file: "/app/hazelcast-network.xml" {{- with .Values.application }} JAVA_OPTS: "\ {{- with .memory }} @@ -41,4 +42,7 @@ data: {{- end }} helm.release.version: "{{ $.Chart.Version }}" container.image: "{{ $.Values.image.registry }}{{ if $.Values.image.registry }}/{{ end }}{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}" + {{- if .environmentVariables }} + {{- toYaml .environmentVariables | nindent 2 }} + {{- end -}} {{- end -}} diff --git a/charts/frank-console/templates/deployment.yaml b/charts/frank-console/templates/deployment.yaml index 786732f..3a9c8b7 100644 --- a/charts/frank-console/templates/deployment.yaml +++ b/charts/frank-console/templates/deployment.yaml @@ -71,4 +71,7 @@ spec: - key: {{ $e.key }} path: {{ $e.key }} defaultMode: 0664 - {{- end }} \ No newline at end of file + {{- end }} + - name: {{ template "frank-console.fullname" . }}-hazelcast-network + configMap: + name: {{ .Release.Name }}-hazelcast-network \ No newline at end of file diff --git a/charts/frank-console/values.schema.json b/charts/frank-console/values.schema.json index e2bf8af..58563b7 100644 --- a/charts/frank-console/values.schema.json +++ b/charts/frank-console/values.schema.json @@ -224,14 +224,6 @@ "type": "object", "description": "Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.", "default": {} - }, - "tls": { - "type": "array", - "description": "Define tls secrets for hosts", - "default": "[]", - "items": { - "type": "string" - } } } }, diff --git a/charts/frank-console/values.yaml b/charts/frank-console/values.yaml index ad1da10..1111a2f 100644 --- a/charts/frank-console/values.yaml +++ b/charts/frank-console/values.yaml @@ -95,6 +95,9 @@ application: admin: "" webService: "" observer: "" + ## @param application.environmentVariables [object] Set extra environment variables for the Frank! + ## + environmentVariables: { } ## @param application.javaOpts [string] Append custom options to the `JAVA_OPTS` environment variable for the Frank! ## javaOpts: "" @@ -226,7 +229,7 @@ ingress: paths: - path: / pathType: ImplementationSpecific - ## @param ingress.tls [array] Define tls secrets for hosts + ## @param ingress.tls [object] Define tls secrets for hosts ## e.g. ## tls: ## - secretName: chart-example-tls diff --git a/charts/frank2example/Chart.lock b/charts/frank2example/Chart.lock index 37432ce..2b4211c 100644 --- a/charts/frank2example/Chart.lock +++ b/charts/frank2example/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: frankframework repository: file://../frankframework - version: 0.3.1 -digest: sha256:5243207f036642eaccf8b0a69a14de716c2c1a4c9faa5c9025500db2ae6deb5b -generated: "2024-08-27T11:16:15.6120901+02:00" + version: 0.3.2 +digest: sha256:9964b433c6ea25a6976356e24ec445af22a9dc4916ecaa1773bbab597ea07b95 +generated: "2024-09-02T11:04:56.2688498+02:00" diff --git a/charts/frank2example/Chart.yaml b/charts/frank2example/Chart.yaml index 660a254..9cabd74 100644 --- a/charts/frank2example/Chart.yaml +++ b/charts/frank2example/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: frank2example description: A Helm chart for running Frank2Example on Kubernetes -version: 0.3.0 +version: 0.3.1 type: application home: https://frankframework.org icon: https://raw.githubusercontent.com/frankframework/charts/master/charts/frank2example/icon.svg @@ -11,5 +11,5 @@ keywords: dependencies: - name: frankframework - version: 0.3.1 + version: 0.3.2 repository: file://../frankframework \ No newline at end of file diff --git a/charts/frank2example/README.md b/charts/frank2example/README.md index 27af29f..3f71d08 100644 --- a/charts/frank2example/README.md +++ b/charts/frank2example/README.md @@ -38,19 +38,21 @@ helm delete my-frank2example This chart is a wrapper for the Frank!Framework chart. See the documentation for the Frank!Framework chart for more information. -| Name | Description | Value | -| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------- | -| `frankframework.image.registry` | frank2example image registry | `nexus.frankframework.org` | -| `frankframework.image.repository` | frank2example image repository | `frank2example` | -| `frankframework.image.tag` | frank2example image tag (immutable tags are recommended) | `latest` | -| `frankframework.image.pullPolicy` | frank2example image pull policy | `IfNotPresent` | -| `frankframework.image.pullSecrets` | frank2example image pull secrets | `[]` | -| `frankframework.application.dtap.stage` | Set the `DTAP` stage. Options: `LOC`, `DEV`, `TST`, `ACC`, `PRD` | `LOC` | -| `frankframework.application.resources` | Set Yaml properties for configuring the connections for theFrank!Framework | `{}` | -| `frankframework.application.resources` | Note: If kept empty no resources.yml will be generated, this can be used if the application already has a resources.yml | | -| `frankframework.application.resources` | Note: Not all options will be documented here, please refer to the Frank!Framework documentation for more information. | | -| `frankframework.replicaCount` | Number of Frank!Framework replicas to deploy | `1` | -| `frankframework.securityContext.readOnlyRootFilesystem` | Set the security context for the Frank!Framework containers | `true` | +| Name | Description | Value | +| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------- | +| `frankframework.image.registry` | frank2example image registry | `nexus.frankframework.org` | +| `frankframework.image.repository` | frank2example image repository | `frank2example` | +| `frankframework.image.tag` | frank2example image tag (immutable tags are recommended) | `latest` | +| `frankframework.image.pullPolicy` | frank2example image pull policy | `Always` | +| `frankframework.image.pullSecrets` | frank2example image pull secrets | `[]` | +| `frankframework.application.dtap.stage` | Set the `DTAP` stage. Options: `LOC`, `DEV`, `TST`, `ACC`, `PRD` | `TST` | +| `frankframework.application.resources` | Set Yaml properties for configuring the connections for theFrank!Framework | `{}` | +| `frankframework.application.resources` | Note: If kept empty no resources.yml will be generated, this can be used if the application already has a resources.yml | | +| `frankframework.application.resources` | Note: Not all options will be documented here, please refer to the Frank!Framework documentation for more information. | | +| `frankframework.application.properties` | Set Yaml properties for configuring the connections for theFrank!Framework | `{}` | +| `frankframework.application.properties.jdbc.datasource.default` | Set the default datasource | `""` | +| `frankframework.replicaCount` | Number of Frank!Framework replicas to deploy | `1` | +| `frankframework.securityContext.readOnlyRootFilesystem` | Set the security context for the Frank!Framework containers | `true` | ## Configuration and installation details diff --git a/charts/frank2example/values.schema.json b/charts/frank2example/values.schema.json index ace4c9d..c3a8884 100644 --- a/charts/frank2example/values.schema.json +++ b/charts/frank2example/values.schema.json @@ -26,7 +26,7 @@ "pullPolicy": { "type": "string", "description": "frank2example image pull policy", - "default": "IfNotPresent" + "default": "Always" }, "pullSecrets": { "type": "array", @@ -45,7 +45,7 @@ "stage": { "type": "string", "description": "Set the `DTAP` stage. Options: `LOC`, `DEV`, `TST`, `ACC`, `PRD`", - "default": "LOC" + "default": "TST" } } } diff --git a/charts/frank2example/values.yaml b/charts/frank2example/values.yaml index 71b4068..658c2a6 100644 --- a/charts/frank2example/values.yaml +++ b/charts/frank2example/values.yaml @@ -25,7 +25,7 @@ frankframework: registry: nexus.frankframework.org repository: frank2example tag: "latest" - pullPolicy: IfNotPresent + pullPolicy: Always pullSecrets: [] ## @param frankframework.application.dtap.stage Set the `DTAP` stage. Options: `LOC`, `DEV`, `TST`, `ACC`, `PRD` @@ -37,12 +37,16 @@ frankframework: ## application: dtap: - stage: LOC + stage: TST resources: jdbc: - name: frank2example type: org.h2.jdbcx.JdbcDataSource url: jdbc:h2:mem:frank2example;NON_KEYWORDS=VALUE;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1;TRACE_LEVEL_FILE=0; + ## @param frankframework.application.properties [object] Set Yaml properties for configuring the connections for theFrank!Framework + ## @param frankframework.application.properties.jdbc.datasource.default [string] Set the default datasource + properties: + jdbc.datasource.default: jdbc/frank2example ## @param frankframework.replicaCount Number of Frank!Framework replicas to deploy ## diff --git a/charts/frankframework/Chart.lock b/charts/frankframework/Chart.lock index 819c419..334f3da 100644 --- a/charts/frankframework/Chart.lock +++ b/charts/frankframework/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: frank-console repository: file://../frank-console - version: 0.1.1 -digest: sha256:082a4342c9e88659ecb46c52afb387a139606e19fee0f0dc386440facde9f1dd -generated: "2024-08-27T10:52:19.6053592+02:00" + version: 0.1.2 +digest: sha256:71e05fa89823edb1505aef27bb1fad3f6da958ab382b06f778508162cda968a1 +generated: "2024-09-02T11:04:53.2461361+02:00" diff --git a/charts/frankframework/Chart.yaml b/charts/frankframework/Chart.yaml index 353e3a7..64fc9e0 100644 --- a/charts/frankframework/Chart.yaml +++ b/charts/frankframework/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: frankframework description: A Helm chart for running the Frank!Framework on Kubernetes -version: 0.3.1 +version: 0.3.2 appVersion: "8.3.0-SNAPSHOT" type: application home: https://frankframework.org @@ -15,7 +15,7 @@ keywords: dependencies: - name: frank-console - version: 0.1.1 + version: 0.1.2 alias: console condition: console.enabled repository: file://../frank-console \ No newline at end of file diff --git a/charts/frankframework/templates/_container.yaml b/charts/frankframework/templates/_container.yaml index fca7e7a..478756a 100644 --- a/charts/frankframework/templates/_container.yaml +++ b/charts/frankframework/templates/_container.yaml @@ -62,16 +62,22 @@ volumeMounts: subPath: K8sSpecifics.yaml readOnly: true {{- end }} + {{- if .Values.console.enabled }} + - name: {{ template "frankframework.fullname" . }}-hazelcast-network + mountPath: /usr/local/tomcat/lib/hazelcast-network.xml + subPath: hazelcast-network.xml + readOnly: true + {{- end }} ports: + - name: hazelcast + containerPort: 5701 + protocol: TCP - name: http containerPort: 8080 protocol: TCP - name: https containerPort: 8443 protocol: TCP - - name: hazelcast - containerPort: 5701 - protocol: TCP - name: multicast containerPort: 54327 protocol: TCP diff --git a/charts/frankframework/templates/configmap.env.yaml b/charts/frankframework/templates/configmap.env.yaml index 1b7d221..33c0893 100644 --- a/charts/frankframework/templates/configmap.env.yaml +++ b/charts/frankframework/templates/configmap.env.yaml @@ -11,6 +11,7 @@ metadata: data: {{- if .Values.console.enabled }} management.gateway.inbound.class: "org.frankframework.management.gateway.HazelcastInboundGateway" + hazelcast.network.file: "/usr/local/tomcat/lib/hazelcast-network.xml" {{- end }} {{- with .Values.application }} # Enable Narayana transaction manager diff --git a/charts/frankframework/templates/configmap.hazelcast-network.yaml b/charts/frankframework/templates/configmap.hazelcast-network.yaml new file mode 100644 index 0000000..8949a31 --- /dev/null +++ b/charts/frankframework/templates/configmap.hazelcast-network.yaml @@ -0,0 +1,26 @@ +{{/* +ConfigMap for configuring the Hazelcast network +*/}} +{{- if .Values.console.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-hazelcast-network + labels: + {{- include "frankframework.labels" . | nindent 4 }} +data: + hazelcast-network.xml: | + + + + + 5701 + + + + + + +{{- end -}} \ No newline at end of file diff --git a/charts/frankframework/templates/deployment.yaml b/charts/frankframework/templates/deployment.yaml index 896729c..e9bf821 100644 --- a/charts/frankframework/templates/deployment.yaml +++ b/charts/frankframework/templates/deployment.yaml @@ -96,3 +96,8 @@ spec: configMap: name: {{ template "frankframework.fullname" . }}-k8s-specifics {{- end }} + {{- if .Values.console.enabled }} + - name: {{ template "frankframework.fullname" . }}-hazelcast-network + configMap: + name: {{ .Release.Name }}-hazelcast-network + {{- end }} diff --git a/charts/frankframework/templates/service.hazelcast.yaml b/charts/frankframework/templates/service.hazelcast.yaml new file mode 100644 index 0000000..55620a4 --- /dev/null +++ b/charts/frankframework/templates/service.hazelcast.yaml @@ -0,0 +1,17 @@ +{{/* Hazelcast service for the console (this one will be used by the console to connect to the cluster) */}} +{{- if .Values.console.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-hazelcast + labels: + {{- include "frankframework.labels" . | nindent 4 }} +spec: + type: ClusterIP + clusterIP: None + selector: + {{- include "frankframework.selectorLabels" . | nindent 4 }} + ports: + - name: hazelcast + port: 5701 +{{- end -}} \ No newline at end of file