feat(focalboard): Use official image (#1952)

* feat(focalboard): Use official image

* fix name and variable

* typo

* fullpath?

* run tests

* add init

* trim

* dont enc

* change confmap

* typo

* disable ssl

* refactor confmap

* ssl disable

* remove rofs

* update questions and re-add rofs

* update image and fix questions.yaml
This commit is contained in:
Stavros Kois
2022-02-25 01:49:53 +02:00
committed by GitHub
parent 87bd915681
commit 6db8475392
5 changed files with 106 additions and 22 deletions
+5 -1
View File
@@ -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
+35 -4
View File
@@ -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
@@ -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 -}}
+20 -1
View File
@@ -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" . }}
+15 -16
View File
@@ -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