Skip to content

Commit

Permalink
Added microservicesruntime.licenseKeyProvided flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Friedhoff committed Jan 24, 2024
1 parent 67827be commit c9b3d4c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion microservicesruntime/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions microservicesruntime/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your path and filename to Microservices Runtime license file>
Expand Down Expand Up @@ -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" . }}
6 changes: 6 additions & 0 deletions microservicesruntime/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -171,13 +175,15 @@ spec:
defaultMode: {{ .defaultMode }}
{{- end }}
{{- end }}
{{- if .Values.microservicesruntime.licenseKeyProvided }}
- name: microservicesruntime-license
configMap:
name: {{ include "microservicesruntime.licenseConfigMapName" . }}
defaultMode: 0666
items:
- key: licensekey
path: licenseKey.xml
{{- end }}
- name: application-properties
configMap:
name: {{ include "common.names.fullname" . }}
Expand Down
4 changes: 4 additions & 0 deletions microservicesruntime/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c9b3d4c

Please sign in to comment.