Skip to content

Commit bdd722c

Browse files
committed
Support adding arbitrary env variables to each application container
1 parent 20b9cf1 commit bdd722c

File tree

23 files changed

+134
-11
lines changed

23 files changed

+134
-11
lines changed

charts/thub/Chart.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: 1.8.9
9+
version: 1.9.0
1010

1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to
@@ -17,17 +17,17 @@ home: https://hypercision.github.io/helm-charts
1717

1818
dependencies:
1919
- name: assigned-item-service
20-
version: 1.4.0
20+
version: 1.5.0
2121
- name: item-service
22-
version: 1.3.2
22+
version: 1.4.0
2323
- name: keycloak-config
2424
version: 0.1.1
2525
- name: lms-data-service
26-
version: 1.6.1
26+
version: 1.7.0
2727
- name: ojt
28-
version: 1.5.6
28+
version: 1.6.0
2929
- name: user-service
30-
version: 1.3.5
30+
version: 1.4.0
3131

3232
sources:
3333
- https://github.com/hypercision/masterdata-services

charts/thub/charts/assigned-item-service/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type: application
77
# This is the chart version. This version number should be incremented each time you make changes
88
# to the chart and its templates, including the app version.
99
# Versions are expected to follow Semantic Versioning (https://semver.org/)
10-
version: 1.4.0
10+
version: 1.5.0
1111

1212
# This is the version number of the application being deployed. This version number should be
1313
# incremented each time you make changes to the application. Versions are not expected to

charts/thub/charts/assigned-item-service/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ Create the name of the service account to use
6161
{{- end }}
6262
{{- end }}
6363

64+
{{/*
65+
Create the name of the Assigned Item Service application settings configmap
66+
*/}}
67+
{{- define "assigned-item-service.assignedItemServiceConfigmapName" -}}
68+
{{ include "assigned-item-service.name" . }}-application-config
69+
{{- end }}
70+
6471
{{/*
6572
Create the name of the Grails datasource configmap
6673
*/}}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This will have different values for each client/namespace
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "assigned-item-service.assignedItemServiceConfigmapName" . }}
6+
labels:
7+
{{- include "assigned-item-service.labels" . | nindent 4 }}
8+
annotations:
9+
description: >
10+
Contains configuration settings specifically for the Assigned Item Service Grails application,
11+
which will be supplied to the Assigned Item Service Grails application as environment variables.
12+
data:
13+
{{- if .Values.additionalConfig }}
14+
{{- range $key, $value := .Values.additionalConfig }}
15+
{{ $key }}: {{ $value | quote }}
16+
{{- end }}
17+
{{- end }}

charts/thub/charts/assigned-item-service/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ spec:
6161
name: {{ .Values.global.activemqBrokerConfigMapName }}
6262
- configMapRef:
6363
name: {{ .Values.global.sharedSettingsConfigMapName }}
64+
- configMapRef:
65+
name: {{ include "assigned-item-service.assignedItemServiceConfigmapName" . }}
6466
volumeMounts:
6567
- name: application-config
6668
mountPath: /home/app/config

charts/thub/charts/assigned-item-service/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ readinessProbe: |
7171
service:
7272
type: ClusterIP
7373

74+
# Any additional environment variables to be set in the Assigned Item Service container.
75+
# For example, custom.property.one: "value1"
76+
additionalConfig: {}
77+
7478
resources: {}
7579
# We usually recommend not to specify default resources and to leave this as a conscious
7680
# choice for the user. This also increases chances charts run on environments with little

charts/thub/charts/item-service/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type: application
77
# This is the chart version. This version number should be incremented each time you make changes
88
# to the chart and its templates, including the app version.
99
# Versions are expected to follow Semantic Versioning (https://semver.org/)
10-
version: 1.3.2
10+
version: 1.4.0
1111

1212
# This is the version number of the application being deployed. This version number should be
1313
# incremented each time you make changes to the application. Versions are not expected to

charts/thub/charts/item-service/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ Create the name of the service account to use
6161
{{- end }}
6262
{{- end }}
6363

64+
{{/*
65+
Create the name of the Item Service application settings configmap
66+
*/}}
67+
{{- define "item-service.itemServiceConfigmapName" -}}
68+
{{ include "item-service.name" . }}-application-config
69+
{{- end }}
70+
6471
{{/*
6572
Create the name of the Grails datasource configmap
6673
*/}}

charts/thub/charts/item-service/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ spec:
5757
name: {{ .Values.global.activemqBrokerConfigMapName }}
5858
- configMapRef:
5959
name: {{ .Values.global.sharedSettingsConfigMapName }}
60+
- configMapRef:
61+
name: {{ include "item-service.itemServiceConfigmapName" . }}
6062
volumeMounts:
6163
- name: application-config
6264
mountPath: /home/app/config
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This will have different values for each client/namespace
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "item-service.itemServiceConfigmapName" . }}
6+
labels:
7+
{{- include "item-service.labels" . | nindent 4 }}
8+
annotations:
9+
description: >
10+
Contains configuration settings specifically for the Item Service Grails application,
11+
which will be supplied to the Item Service Grails application as environment variables.
12+
data:
13+
{{- if .Values.additionalConfig }}
14+
{{- range $key, $value := .Values.additionalConfig }}
15+
{{ $key }}: {{ $value | quote }}
16+
{{- end }}
17+
{{- end }}

0 commit comments

Comments
 (0)