From c9b3d4c206efe8dd72baf9c7e0f45431df7af024 Mon Sep 17 00:00:00 2001 From: Marc Friedhoff Date: Wed, 24 Jan 2024 09:57:33 +0100 Subject: [PATCH] Added microservicesruntime.licenseKeyProvided flag --- microservicesruntime/helm/Chart.yaml | 2 +- microservicesruntime/helm/README.md.gotmpl | 16 ++++++++++++++-- .../helm/templates/deployment.yaml | 6 ++++++ microservicesruntime/helm/values.yaml | 4 ++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/microservicesruntime/helm/Chart.yaml b/microservicesruntime/helm/Chart.yaml index e24de0f..7d0b2c5 100644 --- a/microservicesruntime/helm/Chart.yaml +++ b/microservicesruntime/helm/Chart.yaml @@ -25,7 +25,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.1 +version: 1.0.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/microservicesruntime/helm/README.md.gotmpl b/microservicesruntime/helm/README.md.gotmpl index 1694d57..04f1693 100644 --- a/microservicesruntime/helm/README.md.gotmpl +++ b/microservicesruntime/helm/README.md.gotmpl @@ -28,9 +28,14 @@ If you need to create an own image with additional webMethods product components ### Licenses -Microservices Runtime requires a license file. These license is supposed to be provided as configmap. +Microservices Runtime requires a license file. These license is supposed to be provided as configmap. If you want to omit the license key +because you are using a trial image or an image with a baked-in license key, use: -Hence before running `helm install`, create the configmap: +``` +--set microservicesruntime.licenseKeyProvided=false +``` + +If you do not set this flag to false, this helm charts expects a license key provided via configmap. Create the license key configmap as follows: ``` kubectl create configmap microservicesruntime-license-key --from-file=licensekey= @@ -91,4 +96,11 @@ helm install wm-msr webmethods/microservicesruntime \ --set "image.tag=10.15" ``` +## Version History + +| Version | Changes and Description | +|-----|------| +| `1.0.1` | Initial release | +| `1.0.2` | Added new option `microservicesruntime.licenseKeyProvided` to allow using images with trial or baked-in license key | + {{ template "chart.valuesSection" . }} diff --git a/microservicesruntime/helm/templates/deployment.yaml b/microservicesruntime/helm/templates/deployment.yaml index 028a53f..bc395b4 100644 --- a/microservicesruntime/helm/templates/deployment.yaml +++ b/microservicesruntime/helm/templates/deployment.yaml @@ -72,8 +72,10 @@ spec: value: {{ .Values.microservicesruntime.memoryHeap.min }} - name: JAVA_MAX_MEM value: {{ .Values.microservicesruntime.memoryHeap.max }} + {{- if .Values.microservicesruntime.licenseKeyProvided }} - name: SAG_IS_LICENSE_FILE value: {{ .Values.microservicesruntime.installDir }}/licenseKey.xml + {{- end }} - name: SAG_IS_CONFIG_PROPERTIES value: "{{ .Values.microservicesruntime.installDir }}/applicationFile.properties,{{ .Values.microservicesruntime.installDir }}/application.properties" {{- if .Values.persistence.enabled }} @@ -126,10 +128,12 @@ spec: resources: {{- toYaml .Values.resources.msrContainer | nindent 12 }} volumeMounts: + {{- if .Values.microservicesruntime.licenseKeyProvided }} - name: microservicesruntime-license mountPath: {{ .Values.microservicesruntime.installDir }}/licenseKey.xml subPath: licenseKey.xml readOnly: true + {{- end }} - name: application-properties mountPath: {{ .Values.microservicesruntime.installDir }}/application.properties subPath: application.properties @@ -171,6 +175,7 @@ spec: defaultMode: {{ .defaultMode }} {{- end }} {{- end }} + {{- if .Values.microservicesruntime.licenseKeyProvided }} - name: microservicesruntime-license configMap: name: {{ include "microservicesruntime.licenseConfigMapName" . }} @@ -178,6 +183,7 @@ spec: items: - key: licensekey path: licenseKey.xml + {{- end }} - name: application-properties configMap: name: {{ include "common.names.fullname" . }} diff --git a/microservicesruntime/helm/values.yaml b/microservicesruntime/helm/values.yaml index 93be07f..7a93d52 100644 --- a/microservicesruntime/helm/values.yaml +++ b/microservicesruntime/helm/values.yaml @@ -139,6 +139,10 @@ microservicesruntime: scheme: "HTTP" # -- Name of config map which contains the license key. If you ommit this, it defaults to the release name + microservicesruntime-license. licenseConfigMap: "microservicesruntime-license-key" + + # -- Controls wether a license key is provided or not. Set this to false if you intent to use a trial MSR image or an Image with a baked-in license file. + licenseKeyProvided: true + memoryHeap: ## -- Minimum of allocated heap memory min: "512M"