Skip to content

Commit

Permalink
wip(charts): only mount web.wml if a tomcat config map is given [pack]
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Feb 4, 2022
1 parent 28dddc7 commit 65c2aa7
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions charts/thredds/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,13 @@ spec:
{{- end }}
spec:
initContainers:
{{- if .Values.tomcatConfigMapName }}
{{- include "common.envsubstConfig.renderInitContainer" ( dict "args" (
dict "targetVolumeName" "tomcat-config" "helperSuffix" "-tomcat" "env" (dict)) "context" $ ) | nindent 8 }}
{{- end }}
{{- include "common.envsubstConfig.renderInitContainer" ( dict "args" (
dict "targetVolumeName" "thredds-config" "helperSuffix" "-thredds" "env" (dict)) "context" $ ) | nindent 8 }}
containers:
- name: debug-shell
image: busybox
command: [ 'sh', '-c', 'while true; do sleep 10; done' ]
volumeMounts:
- mountPath: /usr/local/tomcat/conf/web.wml
name: tomcat-config
subPath: web.xml
- mountPath: /usr/local/tomcat/content/thredds
name: thredds-config
- mountPath: /usr/local/tomcat/content/thredds/public
subPath: {{ .Values.publicDataSubPath }}
name: thredds-data
- mountPath: /usr/local/tomcat/content/thredds/cache
subPath: {{ .Values.cacheDataSubPath }}
name: thredds-data
- name: {{ include "common.names.name" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand All @@ -54,9 +41,11 @@ spec:
- name: {{ include "common.names.name" . }}
containerPort: 8080
volumeMounts:
{{- if and .Values.tomcatConfigMapName }}
- mountPath: /usr/local/tomcat/conf/web.xml
name: tomcat-config
subPath: web.xml
{{- end }}
- mountPath: /usr/local/tomcat/content/thredds
name: thredds-config
- mountPath: /usr/local/tomcat/content/thredds/public
Expand All @@ -74,8 +63,10 @@ spec:
{{- if .Values.dataVolume }}
{{- include "common.tplvalues.render" ( dict "value" .Values.dataVolume "context" $ ) | nindent 10 }}
{{- end }}
{{- if .Values.tomcatConfigMapName }}
{{- include "common.envsubstConfig.renderVolume" ( dict "args" (
dict "configMapName" .Values.tomcatConfigMapName "helperSuffix" "-tomcat") "context" $ ) | nindent 8 }}
{{- end }}
{{- include "common.envsubstConfig.renderVolume" ( dict "args" (
dict "configMapName" .Values.configMapName "helperSuffix" "-thredds") "context" $ ) | nindent 8 }}
{{- if .Values.extraVolumes }}
Expand Down

0 comments on commit 65c2aa7

Please sign in to comment.