TrueChartsClone/charts/incubator/wisemapping/templates/_configmap.tpl

57 lines
1.8 KiB
Smarty
Raw Normal View History

feat(wisemapping): Add Wisemapping (#18744) **Description** Fixed the config and init, but I'll need to test and see if it's all as it should inside the `app.properties` file ⚒️ Fixes #18738 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
2024-03-05 15:14:05 +00:00
{{/* Define the configmap */}}
{{- define "wisemapping.configmap" -}}
{{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}}
{{- $pgdb := .Values.cnpg.main.database -}}
{{- $pguser := .Values.cnpg.main.user -}}
{{- $pgpassword := .Values.cnpg.main.creds.password | trimAll "\"" -}}
{{- $pghost := .Values.cnpg.main.creds.host | trimAll "\"" -}}
enabled: true
data:
{{- if .Values.wisemappingConfig }}
app.properties: |
{{- .Values.wisemappingConfig | toYaml | nindent 4 }}
{{- else }}
app.properties.dummy: |
; Database Details
database.url=jdbc:{{ $pghost }}/wisemapping
database.driver=org.postgresql.Driver
database.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
database.username= {{ $pguser }}
database.password= {{ $pgpassword }}
database.validation.enabled=true
database.validation.query=
database.validation.enabled=false
; Paths
admin.user = {{ .Values.workload.main.podSpec.containers.main.env.ADMIN_EMAIL }}
#site.baseurl = http://localhost:8080
# Site Homepage URL. This will be used as URL for homepage location.
site.homepage = c/login
# Font end static content can be deployed externally to the web app. Uncomment here and specify the url base location.
site.static.js.url = /static
{{- end }}
{{- end -}}
{{- define "wisemapping.configVolume" -}}
enabled: true
type: configmap
objectName: wisemapping-config
targetSelector:
main:
main: {}
init-config: {}
{{- if .Values.wisemappingConfig }}
mountPath: /usr/local/tomcat/webapps/ROOT/WEB-INF/
items:
- key: app.properties
path: app.properties
{{- else }}
mountPath: /usr/local/tomcat/webapps/ROOT/WEB-INF/dummy
items:
- key: app.properties.dummy
path: app.properties.dummy
{{- end -}}
{{- end -}}