| apiVersion: v1 |
| kind: ConfigMap |
| metadata: |
| namespace: {{.Release.Namespace}} |
| name: {{ template "common.names.fullname" . }}-configmap |
| labels: |
| {{- include "common.labels.standard" . | nindent 4 }} |
| data: |
| application-bootstrap.yml: |- |
| {{- /* Put the whole application-bootstrap.yml here*/}} |
| {{- /* "common.tplvalues.render" is used to render vars in values.yaml, especially the area of "sync.websocket" */}} |
| {{- include "common.tplvalues.render" (dict "value" .Values.applicationConfig.bootstrap "context" $) | nindent 4 }} |
| application-admin.yml: |- |
| {{- /* similiar to application-bootstrap.yml*/}} |
| {{- include "common.tplvalues.render" (dict "value" .Values.applicationConfig.admin "context" $) | nindent 4 }} |
| {{- if eq .Values.dataSource.active "h2" }} |
| application-h2.yml: |- |
| shenyu: |
| database: |
| dialect: h2 |
| init_script: "sql-script/h2/schema.sql" |
| init_enable: {{ .Values.dataSource.initEnabled }} |
| spring: |
| datasource: |
| url: {{ template "shenyu.h2.url" . }} |
| username: {{ required ".dataSource.h2.username is required" .Values.dataSource.h2.username }} |
| password: {{ required ".dataSource.h2.password is required" .Values.dataSource.h2.password }} |
| driver-class-name: org.h2.Driver |
| {{- end }} |
| {{- if eq .Values.dataSource.active "mysql" }} |
| application-mysql.yml: |- |
| shenyu: |
| database: |
| dialect: mysql |
| init_enable: {{ .Values.dataSource.initEnabled }} |
| spring: |
| datasource: |
| url: {{ template "shenyu.mysql.url" . }} |
| username: {{ required ".dataSource.mysql.username is required" .Values.dataSource.mysql.username }} |
| password: {{ required "`dataSource.mysql.password` is required" .Values.dataSource.mysql.password }} |
| driver-class-name: {{ .Values.dataSource.mysql.driverClass }} |
| {{- end }} |
| {{- if eq .Values.dataSource.active "pg" }} |
| application-pg.yml: |- |
| shenyu: |
| database: |
| dialect: postgresql |
| init_enable: {{ .Values.dataSource.initEnabled }} |
| |
| spring: |
| datasource: |
| url: {{ template "shenyu.pg.url" . }} |
| username: {{ required ".dataSource.pg.username is required" .Values.dataSource.pg.username }} |
| password: {{ required "`dataSource.pg.password` is required" .Values.dataSource.pg.password }} |
| driver-class-name: {{ .Values.dataSource.pg.driverClass }} |
| |
| mybatis: |
| type-handlers-package: org.apache.shenyu.admin.mybatis.pg.handler |
| {{- end }} |
| {{- if eq .Values.dataSource.active "oracle" }} |
| application-oracle.yml: |- |
| shenyu: |
| database: |
| dialect: oracle |
| init_enable: {{ .Values.dataSource.initEnabled }} |
| |
| spring: |
| datasource: |
| url: {{ template "shenyu.oracle.url" . }} |
| username: {{ required ".dataSource.oracle.username is required" .Values.dataSource.oracle.username }} |
| password: {{ required "`dataSource.oracle.password` is required" .Values.dataSource.oracle.password }} |
| driver-class-name: oracle.jdbc.OracleDriver |
| {{- end}} |