NAS-124160 / 24.04 / Allow to deploy collabora without certificate (#1549)

* Allow to deploy collabora without certificate

* rename file

* update description
This commit is contained in:
Stavros Kois
2023-09-19 22:27:17 +03:00
committed by GitHub
parent e9ca261a37
commit ab6bbb2e99
9 changed files with 53 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ description: |
annotations:
title: Collabora
type: application
version: 1.2.14
version: 1.2.15
apiVersion: v2
appVersion: '21.11.4.1.1'
kubeVersion: '>=1.16.0-0'

View File

@@ -0,0 +1,26 @@
nodePort: 31980
config:
DONT_GEN_SSL_CERT: 'true'
dictionaries: de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru
domain: nextcloud\.domain\.tld|othernextcloud\.domain\.tld
extra_params: --o:welcome.enable=false --o:user_interface.mode=notebookbar --o:ssl.termination=true
--o:ssl.enable=false --o:net.proto=IPv4 --o:net.post_allow.host[0]=.+ --o:storage.wopi.host[0]=.+
password: changeme
server_name: ssh.sonicaj.com:49980
timezone: Asia/Karachi
username: admin
ixChartContext:
isInstall: false
isUpdate: true
isUpgrade: false
operation: UPDATE
storageClassName: ix-storage-class-col
upgradeMetadata: {}
ixExternalInterfacesConfiguration: []
ixExternalInterfacesConfigurationNames: []
ixVolumes: []
environmentVariables: []
extraAppVolumeMounts: []
ixCertificateAuthorities: {}
ixCertificates: {}
certificate:

View File

@@ -71,14 +71,17 @@ questions:
- "definitions/nodeIP"
- variable: certificate
description: "Collabora Certificate"
description: |
Collabora Certificate</br>
If you do not choose a certificate and do not configure an external reverse proxy</br>
you might have to adjust the extra_params.
label: "Certificate"
group: "Collabora Configuration"
schema:
type: int
$ref:
- "definitions/certificate"
"null": false
"null": true
- variable: extraAppVolumeMounts
label: "Collabora Extra Host Path Volumes"

View File

@@ -15,6 +15,7 @@ spec:
labels: {{ include "common.labels.selectorLabels" . | nindent 8 }}
spec:
containers:
{{ if .Values.certificate }}
- name: {{ .Chart.Name }}-nginx
image: {{ printf "%s:%s" .Values.nginx.image.repository .Values.nginx.image.tag }}
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
@@ -66,6 +67,7 @@ spec:
timeoutSeconds: 2
failureThreshold: 60
successThreshold: 1
{{ end }}
- name: {{ .Chart.Name }}
{{ include "common.resources.limitation" . | nindent 10 }}
{{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
@@ -120,6 +122,7 @@ spec:
{{ $envList = mustAppend $envList (dict "name" "password" "valueFromSecret" true "secretName" $secretName "secretKey" "password") }}
{{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
volumes:
{{ if .Values.certificate }}
- name: configuration
configMap:
defaultMode: 0700
@@ -127,6 +130,7 @@ spec:
- name: certs
secret:
secretName: {{ include "secretName" . }}
{{ end }}
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- name: extrappvolume-{{ $index }}
hostPath:

View File

@@ -1,3 +1,4 @@
{{ if .Values.certificate }}
{{- $serviceName := "localhost" -}}
apiVersion: v1
kind: ConfigMap
@@ -120,3 +121,4 @@ data:
}
}
{{ end }}

View File

@@ -1,6 +0,0 @@
{{ $port := .Values.nodePort }}
{{ $ports := list }}
{{ $ports = mustAppend $ports (dict "name" "https" "nodePort" $port "targetPort" 443 "port" 443) }}
{{ $params := (. | mustDeepCopy) }}
{{ $_ := set $params "commonService" (dict "ports" $ports "type" "NodePort" ) }}
{{ include "common.classes.service" $params }}

View File

@@ -7,9 +7,11 @@ type: Opaque
data:
username: {{ .Values.config.username | b64enc | quote }}
password: {{ .Values.config.password | b64enc | quote }}
{{ if eq (include "certAvailable" .) "true" }}
{{ if .Values.certificate }}
{{ if eq (include "certAvailable" .) "true" }}
certPublicKey: {{ (include "cert.publicKey" .) | toString | b64enc | quote }}
certPrivateKey: {{ (include "cert.privateKey" .) | toString | b64enc | quote }}
{{ else }}
{{ fail "No certificate configured for Collabora" }}
{{ else }}
{{ fail "No certificate configured for Collabora" }}
{{ end }}
{{ end }}

View File

@@ -0,0 +1,10 @@
{{ $port := .Values.nodePort }}
{{ $ports := list }}
{{ if .Values.certificate }}
{{ $ports = mustAppend $ports (dict "name" "https" "nodePort" $port "targetPort" 443 "port" 443) }}
{{ else }}
{{ $ports = mustAppend $ports (dict "name" "http" "nodePort" $port "targetPort" 9980 "port" 9980) }}
{{ end }}
{{ $params := (. | mustDeepCopy) }}
{{ $_ := set $params "commonService" (dict "ports" $ports "type" "NodePort" ) }}
{{ include "common.classes.service" $params }}