Skip to content

Commit 7d5c936

Browse files
committed
Add moduleVersion param to chart
1 parent d9dc6ae commit 7d5c936

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ the subchart is then configured with the following minimal values:
2222
2323
```yaml filename=values.yaml
2424
moduleUrl: "http://mod-x:80"
25+
moduleVersion: 0.1.0-main
2526
moduleDescriptor: |
2627
{
2728
"id" : "mod-x-@version@",

chart/templates/_validate.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
{{- if not .Values.moduleDescriptor -}}
1313
{{- fail "A valid .Values.moduleDescriptor is required!" -}}
1414
{{- end -}}
15+
{{- if not .Values.moduleVersion -}}
16+
{{- fail "A valid .Values.moduleVersion is required!" -}}
17+
{{- end -}}
1518
{{- if empty .Values.tenants -}}
1619
{{- fail "A valid .Values.tenants is required!" -}}
1720
{{- end -}}

chart/templates/moddesc-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ metadata:
66
{{- include "..labels" . | nindent 4 }}
77
data:
88
ModuleDescriptor: |
9-
{{ .Values.moduleDescriptor | default "" | nindent 4 }}
9+
{{ .Values.moduleDescriptor | default "" | replace "@version@" .Values.moduleVersion | nindent 4 }}

chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ okapiSecret: "okapi-secret"
1111
moduleUrl: ""
1212
#required, specify the ModuleDescriptor literal (JSON)
1313
moduleDescriptor: ""
14+
#required, to be replaced in the ModuleDescriptor
15+
moduleVersion: "0.1.0"
1416
#required, specify the Okapi tenant(s) to be used
1517
tenants: []
1618
#required, specify the Okapi admin tenant(s) to be used

0 commit comments

Comments
 (0)