diff --git a/hades/templates/configmap-hibernate.yaml b/hades/templates/configmap-hibernate.yaml deleted file mode 100644 index 61541c7..0000000 --- a/hades/templates/configmap-hibernate.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.config.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "hades.fullname" . }}-hibernate - labels: - {{- include "hades.labels" . | nindent 4 }} -data: - hibernate.cfg.xml: | - - - - - - com.mysql.jdbc.Driver - {{ include "hades.jdbcUrl" . | replace "&" "&" }} - {{ include "hades.databaseUsername" . }} - {{ .Values.database.password | default .Values.mysql.mysqlPassword | default "local-mysql-pass" }} - - - {{ .Values.hibernate.connectionPoolSize | default 10 }} - - - org.hibernate.dialect.MySQLDialect - thread - org.hibernate.cache.NoCacheProvider - - - {{ .Values.hibernate.showSql | default "true" }} - 2 - true - false - - - 10 - 60 - 50 - 0 - 10 - 65 - 3600 - select 1; - - -{{- end }} diff --git a/hades/templates/configmap.yaml b/hades/templates/configmap.yaml index b659b09..b45e7f6 100644 --- a/hades/templates/configmap.yaml +++ b/hades/templates/configmap.yaml @@ -9,4 +9,42 @@ data: {{- with .Values.config.files }} {{- toYaml . | nindent 2 }} {{- end }} + hibernate.cfg.xml: | + + + + + + com.mysql.jdbc.Driver + {{ include "hades.jdbcUrl" . | replace "&" "&" }} + {{ include "hades.databaseUsername" . }} + {{ .Values.database.password | default .Values.mysql.mysqlPassword | default "local-mysql-pass" }} + + + {{ .Values.hibernate.connectionPoolSize | default 10 }} + + + org.hibernate.dialect.MySQLDialect + thread + org.hibernate.cache.NoCacheProvider + + + {{ .Values.hibernate.showSql | default "true" }} + 2 + true + false + + + 10 + 60 + 50 + 0 + 10 + 65 + 3600 + select 1; + + {{- end }} diff --git a/hades/templates/deployment.yaml b/hades/templates/deployment.yaml index d454b30..7d24160 100644 --- a/hades/templates/deployment.yaml +++ b/hades/templates/deployment.yaml @@ -20,7 +20,6 @@ spec: metadata: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/hibernate: {{ include (print $.Template.BasePath "/configmap-hibernate.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} @@ -149,10 +148,6 @@ spec: - name: config mountPath: /etc/onlinesales/config/hades readOnly: true - - name: hibernate-config - mountPath: /etc/onlinesales/config/hades/hibernate.cfg.xml - subPath: hibernate.cfg.xml - readOnly: true {{- end }} {{- if .Values.allhosts.enabled }} - name: allhosts @@ -167,9 +162,6 @@ spec: - name: config configMap: name: {{ include "hades.fullname" . }}-config - - name: hibernate-config - configMap: - name: {{ include "hades.fullname" . }}-hibernate {{- end }} {{- if .Values.allhosts.enabled }} - name: allhosts