fix: add configurable tomcatWritableDirs for non-root pod support
hadesV3 runs as non-root user (1000) and can't write to Tomcat dirs. Added tomcatWritableDirs config to mount emptyDir volumes at paths like /usr/local/tomcat/conf/Catalina and /usr/local/tomcat/work. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
57314032c3
commit
4a8d031c87
@ -142,7 +142,7 @@ spec:
|
|||||||
value: "false"
|
value: "false"
|
||||||
- name: HIBERNATE_HBM2DDL_AUTO
|
- name: HIBERNATE_HBM2DDL_AUTO
|
||||||
value: "validate"
|
value: "validate"
|
||||||
{{- if or .Values.config.enabled .Values.allhosts.enabled }}
|
{{- if or .Values.config.enabled .Values.allhosts.enabled .Values.tomcatWritableDirs.enabled }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
{{- if .Values.config.enabled }}
|
{{- if .Values.config.enabled }}
|
||||||
{{- range .Values.config.mountPaths }}
|
{{- range .Values.config.mountPaths }}
|
||||||
@ -157,8 +157,14 @@ spec:
|
|||||||
subPath: allhosts.tsv
|
subPath: allhosts.tsv
|
||||||
readOnly: true
|
readOnly: true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.tomcatWritableDirs.enabled }}
|
||||||
|
{{- range $i, $path := .Values.tomcatWritableDirs.paths }}
|
||||||
|
- name: tomcat-writable-{{ $i }}
|
||||||
|
mountPath: {{ $path }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.config.enabled .Values.allhosts.enabled }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.config.enabled .Values.allhosts.enabled .Values.tomcatWritableDirs.enabled }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- if .Values.config.enabled }}
|
{{- if .Values.config.enabled }}
|
||||||
- name: config
|
- name: config
|
||||||
@ -170,6 +176,12 @@ spec:
|
|||||||
configMap:
|
configMap:
|
||||||
name: {{ include "hades.fullname" . }}-allhosts
|
name: {{ include "hades.fullname" . }}-allhosts
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.tomcatWritableDirs.enabled }}
|
||||||
|
{{- range $i, $path := .Values.tomcatWritableDirs.paths }}
|
||||||
|
- name: tomcat-writable-{{ $i }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
|
|||||||
@ -293,6 +293,13 @@ config:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Tomcat writable directories (emptyDir mounts for non-root pods)
|
||||||
|
tomcatWritableDirs:
|
||||||
|
enabled: true
|
||||||
|
paths:
|
||||||
|
- /usr/local/tomcat/conf/Catalina
|
||||||
|
- /usr/local/tomcat/work
|
||||||
|
|
||||||
# Hibernate configuration options (hibernate.cfg.xml is now generated dynamically)
|
# Hibernate configuration options (hibernate.cfg.xml is now generated dynamically)
|
||||||
hibernate:
|
hibernate:
|
||||||
connectionPoolSize: 10
|
connectionPoolSize: 10
|
||||||
|
|||||||
@ -190,6 +190,11 @@ hibernate:
|
|||||||
connectionPoolSize: 10
|
connectionPoolSize: 10
|
||||||
showSql: "true"
|
showSql: "true"
|
||||||
|
|
||||||
|
# Tomcat writable directories (emptyDir mounts for non-root pods)
|
||||||
|
tomcatWritableDirs:
|
||||||
|
enabled: false
|
||||||
|
paths: []
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user