Skip to content

Commit

Permalink
make dhis2Home configurable (#83)
Browse files Browse the repository at this point in the history
* make dhis2Home configurable

* update chart version

* /opt/dhis2 is default
  • Loading branch information
bennsimon authored Nov 10, 2023
1 parent 1d43932 commit 59f1012
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/dhis2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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: 0.4.0
version: 0.4.1

# 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
6 changes: 3 additions & 3 deletions charts/dhis2/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ spec:
initContainers:
- name: prepopulate-dhis-web-volume
image: busybox
command: ['sh', '-c', 'cp /config/dhis.conf /opt/dhis2']
command: ['sh', '-c', 'cp /config/dhis.conf {{ .Values.dhis2Home }}']
volumeMounts:
- name: dhis-config-map
mountPath: /config/dhis.conf
subPath: dhis2-conf
- name: dhis-web-volume
mountPath: /opt/dhis2
mountPath: {{ .Values.dhis2Home }}
resources:
{{- toYaml .Values.initResources | nindent 12 }}
volumes:
Expand All @@ -51,7 +51,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: dhis-web-volume
mountPath: /opt/dhis2
mountPath: {{ .Values.dhis2Home }}
{{- if .Values.env }}
env:
{{- tpl (toYaml .Values.env) . | nindent 12 }}
Expand Down
4 changes: 3 additions & 1 deletion charts/dhis2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ pdb:

initResources: {}

dhis2Home: "/opt/dhis2"

env:
# - name: DHIS2_HOME
# value: /DHIS2_home
# value: "{{ .Values.dhis2Home }}"

0 comments on commit 59f1012

Please sign in to comment.