diff --git a/charts/incubator/wisemapping/.helmignore b/charts/incubator/wisemapping/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/wisemapping/.helmignore @@ -0,0 +1,30 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/wisemapping/CHANGELOG.md b/charts/incubator/wisemapping/CHANGELOG.md new file mode 100644 index 00000000000..6afbcc5f802 --- /dev/null +++ b/charts/incubator/wisemapping/CHANGELOG.md @@ -0,0 +1,3 @@ +--- +title: Changelog +--- diff --git a/charts/incubator/wisemapping/Chart.yaml b/charts/incubator/wisemapping/Chart.yaml new file mode 100644 index 00000000000..9887f521146 --- /dev/null +++ b/charts/incubator/wisemapping/Chart.yaml @@ -0,0 +1,39 @@ +annotations: + max_scale_version: 24.04.0 + min_scale_version: 23.10.0 + truecharts.org/SCALE-support: "true" + truecharts.org/category: design + truecharts.org/max_helm_version: "3.14" + truecharts.org/min_helm_version: "3.11" + truecharts.org/train: incubator +apiVersion: v2 +appVersion: 5.0.13 +dependencies: + - name: common + version: 18.1.2 + repository: oci://tccr.io/truecharts + condition: "" + alias: "" + tags: [] + import-values: [] +deprecated: false +description: home-assistant App for TrueNAS SCALE +home: https://truecharts.org/charts/incubator/wisemapping +icon: https://truecharts.org/img/hotlink-ok/chart-icons/wisemapping.png +keywords: + - mapping + - mind-mapping + - collaboration +kubeVersion: ">=1.24.0-0" +maintainers: + - name: TrueCharts + email: info@truecharts.org + url: https://truecharts.org +name: wisemapping +sources: + - https://www.wisemapping.com/ + - https://hub.docker.com/r/wisemapping/wisemapping + - https://github.com/truecharts/charts/tree/master/charts/incubator/wise-mapping + - https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/ +type: application +version: 0.0.1 diff --git a/charts/incubator/wisemapping/README.md b/charts/incubator/wisemapping/README.md new file mode 100644 index 00000000000..bf04295dc89 --- /dev/null +++ b/charts/incubator/wisemapping/README.md @@ -0,0 +1,28 @@ +--- +title: README +--- + +## General Info + +TrueCharts can be installed as both _normal_ Helm Charts or as Apps on TrueNAS SCALE. +However only installations using the TrueNAS SCALE Apps system are supported. + +For more information about this App, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incbuator/wisemapping) + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)** + +## Support + +- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/manual/SCALE/guides/scale-intro). +- See the [Website](https://truecharts.org) +- Check our [Discord](https://discord.gg/tVsPTHWTtr) +- Open a [issue](https://github.com/truecharts/charts/issues/new/choose) + +--- + +## Sponsor TrueCharts + +TrueCharts can only exist due to the incredible effort of our staff. +Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can! + +_All Rights Reserved - The TrueCharts Project_ diff --git a/charts/incubator/wisemapping/icon.png b/charts/incubator/wisemapping/icon.png new file mode 100644 index 00000000000..77f8d425ba5 Binary files /dev/null and b/charts/incubator/wisemapping/icon.png differ diff --git a/charts/incubator/wisemapping/questions.yaml b/charts/incubator/wisemapping/questions.yaml new file mode 100644 index 00000000000..9245501f223 --- /dev/null +++ b/charts/incubator/wisemapping/questions.yaml @@ -0,0 +1,99 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + - variable: env + group: "App Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: ADMIN_EMAIL + label: "ADMIN USER in email format" + description: "Enter an email for the admin users" + schema: + type: string + private: true + default: "change@me.com" +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} +# Include{serviceRoot} +# Include{serviceMain} +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: "Main Service Port Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 8080 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: config + label: "App Config Storage" + description: "Stores the Application Configuration." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressAdvanced} +# Include{ingressList} +# Include{securityContextRoot} + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID of the user running the application" + schema: + type: int + default: 0 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 +# Include{resources} +# Include{postgresql} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/wisemapping/templates/NOTES.txt b/charts/incubator/wisemapping/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/wisemapping/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/wisemapping/templates/_configmap.tpl b/charts/incubator/wisemapping/templates/_configmap.tpl new file mode 100644 index 00000000000..99ff4926c7b --- /dev/null +++ b/charts/incubator/wisemapping/templates/_configmap.tpl @@ -0,0 +1,56 @@ +{{/* 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 -}} \ No newline at end of file diff --git a/charts/incubator/wisemapping/templates/common.yaml b/charts/incubator/wisemapping/templates/common.yaml new file mode 100644 index 00000000000..dbdd86a2bd0 --- /dev/null +++ b/charts/incubator/wisemapping/templates/common.yaml @@ -0,0 +1,20 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{/* Render configmap for wisemapping */}} +{{- $config := include "wisemapping.configmap" . | fromYaml -}} +{{- if $config -}} + {{- $_ := set .Values.configmap "wisemapping-config" $config -}} +{{- end -}} + +{{- if not .Values.wisemappingConfig -}} + {{- $_ := set .Values.persistence.config "enabled" true -}} +{{- end -}} + +{{- $vol := include "wisemapping.configVolume" . | fromYaml -}} +{{- if $vol -}} + {{- $_ := set .Values.persistence "wisemapping-config" $vol -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/wisemapping/values.yaml b/charts/incubator/wisemapping/values.yaml new file mode 100644 index 00000000000..8b885153ce6 --- /dev/null +++ b/charts/incubator/wisemapping/values.yaml @@ -0,0 +1,68 @@ +image: + repository: wisemapping/wisemapping + pullPolicy: IfNotPresent + tag: latest@sha256:4242fce8570c3f288c664c3615e5efe197249fed9def881c35528bcc0287699e + +# When this is defined, the contents will be mounted +# as configmap into the container at /usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties. +wisemappingConfig: {} + +securityContext: + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + +service: + main: + ports: + main: + port: 8080 + targetPort: 8080 + +workload: + main: + podSpec: + initContainers: + init-config: + enabled: true + type: init + imageSelector: "image" + command: + - /bin/sh + - -c + args: + - | + mkdir -p /usr/local/tomcat/webapps/ROOT/WEB-INF/ + if [ ! -f /usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties ]; then + echo "Config file not found, copying dummy..." + cp /usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties.dummy /usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties + echo "Config file copied, you can now edit it at /usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties" + fi + containers: + main: + env: + ADMIN_EMAIL: "change@me.com" + + +persistence: + config: + # Only enable when not using wisemappingConfig + enabled: false + mountPath: /usr/local/tomcat/webapps/ROOT/WEB-INF/ + targetSelector: + main: + main: {} + init-config: {} + +cnpg: + main: + enabled: true + user: wisemapping + database: wisemapping + +portal: + open: + enabled: true +