diff --git a/charts/stable/focalboard/Chart.yaml b/charts/stable/focalboard/Chart.yaml index f34c97a2410..e33989d8671 100644 --- a/charts/stable/focalboard/Chart.yaml +++ b/charts/stable/focalboard/Chart.yaml @@ -4,6 +4,10 @@ dependencies: - name: common repository: https://truecharts.org version: 8.16.0 +- condition: postgresql.enabled + name: postgresql + repository: https://truecharts.org/ + version: 6.0.69 description: Focalboard is an open source, self-hosted alternative to Trello, Notion, and Asana. home: https://github.com/truecharts/apps/tree/master/charts/stable/focalboard @@ -22,7 +26,7 @@ sources: - https://www.focalboard.com/ - https://github.com/mattermost/focalboard - https://github.com/FlipEnergy/container-images/blob/main/focalboard -version: 4.0.42 +version: 5.0.0 annotations: truecharts.org/catagories: | - media diff --git a/charts/stable/focalboard/questions.yaml b/charts/stable/focalboard/questions.yaml index 4796540224b..05f9ea48cbf 100644 --- a/charts/stable/focalboard/questions.yaml +++ b/charts/stable/focalboard/questions.yaml @@ -83,6 +83,37 @@ questions: attrs: # Include{fixedEnv} + - variable: focalboard + group: "Container Configuration" + label: "Focalboard Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: serverRoot + label: "serverRoot" + description: "Root URL of the server. eg. https://focal.mydomain.com" + schema: + type: string + default: "http://localhost:10072" + - variable: telemetry + label: "telemetry" + description: "Enable health diagnostics telemetry " + schema: + type: boolean + default: false + - variable: localOnly + label: "localOnly" + description: "Only allow connections from localhost" + schema: + type: boolean + default: false + - variable: enableLocalMode + label: "enableLocalMode" + description: "Enable admin APIs on local Unix port" + schema: + type: boolean + default: true # Include{containerConfig} - variable: service @@ -146,7 +177,7 @@ questions: description: "The internal(!) port on the container the Application runs on" schema: type: int - default: 8000 + default: 10072 - variable: serviceexpert group: "Networking and Services" @@ -175,9 +206,9 @@ questions: additional_attrs: true type: dict attrs: - - variable: data - label: "App Data Storage" - description: "Stores the Application Data." + - variable: uploads + label: "App Uploads Storage" + description: "Stores the Application Uploads." schema: additional_attrs: true type: dict diff --git a/charts/stable/focalboard/templates/_configmap.tpl b/charts/stable/focalboard/templates/_configmap.tpl new file mode 100644 index 00000000000..9b0a0046acf --- /dev/null +++ b/charts/stable/focalboard/templates/_configmap.tpl @@ -0,0 +1,31 @@ +{{- define "focalboard.configmap" -}} + +{{- $pgPass := .Values.postgresql.postgresqlPassword | trimAll "\"" }} +{{- $pgUser := .Values.postgresql.postgresqlUsername }} +{{- $pgDB := .Values.postgresql.postgresqlDatabase }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.names.fullname" . }}-install + labels: + {{- include "common.labels" . | nindent 4 }} +data: + focalboard-config: |- + { + "serverRoot": "{{ .Values.focalboard.serverRoot }}", + "port": {{ .Values.service.main.ports.main.port }}, + "dbtype": "postgres", + "dbconfig": "{{ printf "postgresql://%v:%v@%v-postgresql:5432/%v?sslmode=disable" $pgUser $pgPass .Release.Name $pgDB }}", + "postgres_dbconfig": "dbname=$pgDB sslmode=disable", + "useSSL": false, + "webpath": "./pack", + "filespath": "/uploads", + "telemetry": {{ .Values.focalboard.telemetry }}, + "session_expire_time": 2592000, + "session_refresh_time": 18000, + "localOnly": {{ .Values.focalboard.localOnly }}, + "enableLocalMode": {{ .Values.focalboard.enableLocalMode }}, + "localModeSocketLocation": "/var/tmp/focalboard_local.socket" + } +{{- end -}} diff --git a/charts/stable/focalboard/templates/common.yaml b/charts/stable/focalboard/templates/common.yaml index a6613c2ce21..472219255e8 100644 --- a/charts/stable/focalboard/templates/common.yaml +++ b/charts/stable/focalboard/templates/common.yaml @@ -1 +1,20 @@ -{{ include "common.all" . }} +{{- include "common.setup" . }} + +{{/* Append the hardcoded settings */}} +{{- define "focalboard.harcodedValues" -}} +persistence: + focalboard-config: + enabled: "true" + mountPath: "/opt/focalboard/config.json" + subPath: "focalboard-config" + type: "custom" + volumeSpec: + configMap: + name: {{ printf "%v-install" (include "common.names.fullname" .) }} +{{- end -}} +{{- $_ := mergeOverwrite .Values (include "focalboard.harcodedValues" . | fromYaml) -}} + +{{- include "focalboard.configmap" . }} + +{{/* Render the templates */}} +{{ include "common.postSetup" . }} diff --git a/charts/stable/focalboard/values.yaml b/charts/stable/focalboard/values.yaml index 3e27281c7b0..adb0f4ef83d 100644 --- a/charts/stable/focalboard/values.yaml +++ b/charts/stable/focalboard/values.yaml @@ -1,33 +1,32 @@ image: - # -- image repository repository: tccr.io/truecharts/focalboard - # -- image pull policy pullPolicy: IfNotPresent - # -- image tag - tag: v0.8.0@sha256:0c560a1e1b11015598e63b580d6e21b5bb41bc2e140b15e4a54b7b0c415e765e + tag: v0.14.0@sha256:489150257a4638e83a81e3e07afbb76fd891ae47c8b258b0a271ebcaa95638c3 securityContext: readOnlyRootFilesystem: false -# -- environment variables. See more environment variables in the [image entrypoint script](https://github.com/FlipEnergy/container-images/blob/main/focalboard/entrypoint.sh) -# @default -- See below env: {} - # SERVER_ROOT: - # DBTYPE: - # DBCONFIG: -# -- Configures service settings for the chart. -# @default -- See values.yaml +focalboard: + serverRoot: "http://localhost:10072" + telemetry: false + localOnly: false + enableLocalMode: true + service: main: ports: main: port: 10072 - targetPort: 8000 -# -- Configure persistence settings for the chart under this key. -# @default -- See values.yaml persistence: - data: + uploads: enabled: true - mountPath: "/data" + mountPath: "/uploads" + +postgresql: + enabled: true + existingSecret: "dbcreds" + postgresqlUsername: focalboard + postgresqlDatabase: focalboard