diff --git a/charts/stable/collabora/.helmignore b/charts/stable/collabora/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/stable/collabora/.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/stable/collabora/Chart.yaml b/charts/stable/collabora/Chart.yaml new file mode 100644 index 00000000000..f062d5159ea --- /dev/null +++ b/charts/stable/collabora/Chart.yaml @@ -0,0 +1,28 @@ +apiVersion: v2 +appVersion: v23.05.0.5.1 +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 12.14.2 +deprecated: false +description: An awesome, Online Office suite image suitable for home use. +home: https://truecharts.org/charts/stable/collabora +icon: https://truecharts.org/img/hotlink-ok/chart-icons/collabora.png +keywords: + - office + - document +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: collabora +sources: + - https://github.com/truecharts/charts/tree/master/charts/stable/collabora + - https://github.com/CollaboraOnline/online +type: application +version: 1.0.0 +annotations: + truecharts.org/catagories: | + - office + truecharts.org/SCALE-support: "true" diff --git a/charts/stable/collabora/README.md b/charts/stable/collabora/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/stable/collabora/icon.png b/charts/stable/collabora/icon.png new file mode 100644 index 00000000000..b5753d9516f Binary files /dev/null and b/charts/stable/collabora/icon.png differ diff --git a/charts/stable/collabora/questions.yaml b/charts/stable/collabora/questions.yaml new file mode 100644 index 00000000000..1780fc8ca4f --- /dev/null +++ b/charts/stable/collabora/questions.yaml @@ -0,0 +1,192 @@ +# Include{groups} +portals: + open: +# Include{portalLink} + admin: +# Include{portalLink} + path: /browser/dist/admin/admin.html +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} + - variable: collabora + label: Collabora Configuration + group: App Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: username + label: Username + schema: + type: string + default: admin + required: true + - variable: password + label: Password + schema: + type: string + default: "" + required: true + private: true + - variable: dictionaries + label: Dictionaries + description: Dictionaries + schema: + type: list + default: + - de_DE + - en_GB + - en_US + - el_GR + - es_ES + - fr_FR + - pt_BR + - pt_PT + - it + - nl + - ru + items: + - variable: dictionary + label: Dictionary + description: Dictionary + schema: + type: string + default: "" + required: true + - variable: interface + label: Interface + description: Interface + schema: + type: string + default: default + required: true + enum: + - value: default + description: Default + - value: compact + description: Compact + - value: tabbed + description: Tabbed + - variable: server_name + label: Server Name + description: Server Name + schema: + type: string + default: "" + - variable: aliasgroup1 + label: Alias Group 1 + description: Alias Group 1 + schema: + type: list + default: [] + items: + - variable: alias1 + label: Alias 1 + description: Alias 1 + schema: + type: string + default: "" + required: true + - variable: no_gen_ssl + label: Disable SSL Generation + description: Disable SSL Generation + schema: + type: boolean + default: true + - variable: ssl_enable + label: Enable SSL + description: Enable SSL + schema: + type: boolean + default: false + - variable: ssl_termination + label: Terminate SSL + description: Terminate SSL + schema: + type: boolean + default: true + - variable: extra_params + label: Extra Parameters + description: Extra Parameters + schema: + type: list + default: + - --o:welcome.enable=false + items: + - variable: param + label: Parameter + description: Parameter + schema: + type: string + default: "" + required: true +# 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: 9980 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: Main Ingress + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressAdvanced} +# Include{ingressList} +# Include{securityContextRoot} + - variable: runAsUser + label: runAsUser + description: The UserID of the user running the application + schema: + type: int + default: 568 + - variable: runAsGroup + label: runAsGroup + description: The groupID this App of the user running the application + schema: + type: int + default: 568 +# 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{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/stable/collabora/templates/NOTES.txt b/charts/stable/collabora/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/stable/collabora/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/stable/collabora/templates/_configmap.tpl b/charts/stable/collabora/templates/_configmap.tpl new file mode 100644 index 00000000000..e94563545ed --- /dev/null +++ b/charts/stable/collabora/templates/_configmap.tpl @@ -0,0 +1,46 @@ +{{/* Define the configmap */}} +{{- define "collabora.configmap" -}} +{{- if lt (len .Values.collabora.password) 8 -}} + {{- fail "Collabora - [Password] must be at least 8 characters" -}} +{{- end -}} +{{- if contains "$" .Values.collabora.password -}} + {{- fail "Collabora - [Password] cannot contain [$]" -}} +{{- end -}} +{{- $collaboraUIModes := (list "default" "compact" "tabbed") -}} +{{- if not (mustHas .Values.collabora.interface $collaboraUIModes) -}} + {{- fail (printf "Colabora - Expected [Interface Mode] to be one of [%v], but got [%v]" (join "," $collaboraUIModes) .Values.collabora.interface) -}} +{{- end -}} +{{- if not .Values.collabora.dictionaries -}} + {{- fail "Collabora - Expected non-empty [Dictionaries]" -}} +{{- end -}} + +{{- $fixedParams := (list "--o:mount_jail_tree=false" + "--o:security.seccomp=true" + "--o:home_mode.enable=true" + "--o:logging.level=warning" + "--o:logging.level_startup=warning" + (printf "--o:user_interface.mode=%v" .Values.collabora.interface) + (printf "--o:ssl.enable=%v" .Values.collabora.ssl_enable) + (printf "--o:ssl.termination=%v" .Values.collabora.ssl_termination) ) -}} +{{- $params := concat $fixedParams .Values.collabora.extra_params -}} + +{{- $checkParams := list -}} +{{- range $item := $params -}} + {{- $checkParams = mustAppend $checkParams (regexReplaceAll "--o:(.*)=.*" $item "${1}") -}} +{{- end -}} + +{{- if not (deepEqual $checkParams (uniq $checkParams)) -}} + {{- fail (printf "Collabora - [Dictionaries] must be unique, but got [%v]" ((join ", " $params) | replace "--o:" "")) -}} +{{- end }} + +collabora-config: + enabled: true + data: + aliasgroup1: {{ join "," .Values.collabora.aliasgroup1 }} + server_name: {{ .Values.collabora.server_name }} + dictionaries: {{ join " " .Values.collabora.dictionaries }} + username: {{ .Values.collabora.username | quote }} + password: {{ .Values.collabora.password | quote }} + DONT_GEN_SSL_CERT: {{ .Values.collabora.no_gen_ssl | quote }} + extra_params: {{ join " " $params }} +{{- end -}} diff --git a/charts/stable/collabora/templates/common.yaml b/charts/stable/collabora/templates/common.yaml new file mode 100644 index 00000000000..ba5e621b48b --- /dev/null +++ b/charts/stable/collabora/templates/common.yaml @@ -0,0 +1,10 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . -}} + +{{- $configmaps := include "collabora.configmap" . | fromYaml -}} +{{- if $configmaps -}} + {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} +{{- end -}} + +{{/* Render the templates */}} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/stable/collabora/values.yaml b/charts/stable/collabora/values.yaml new file mode 100644 index 00000000000..073d928dc93 --- /dev/null +++ b/charts/stable/collabora/values.yaml @@ -0,0 +1,60 @@ +image: + repository: tccr.io/truecharts/collabora + pullPolicy: IfNotPresent + tag: v23.05.0.5.1@sha256:a753bfe9d5479e992e914f5818bc96f33ff95dd3760cb10938ae2296286c416e + +collabora: + username: admin + password: changeme + interface: default + dictionaries: + - de_DE + - en_GB + - en_US + - el_GR + - es_ES + - fr_FR + - pt_BR + - pt_PT + - it + - nl + - ru + server_name: example.com + aliasgroup1: https://cloud.example.com + ssl_enable: false + ssl_termination: true + no_gen_ssl: true + extra_params: + - --o:welcome.enable=false + +workload: + main: + podSpec: + containers: + main: + envFrom: + - configMapRef: + name: collabora-config + securityContext: + runAsUser: 100 + runAsGroup: 102 + readOnlyRootFilesystem: false + allowPrivilegeEscalation: true + capabilities: + add: + - CHOWN + - FOWNER + - SYS_CHROOT + - MKNOD + +service: + main: + ports: + main: + protocol: http + targetPort: 9980 + port: 9980 + +portal: + open: + enabled: true