mirror of
https://github.com/truenas/charts.git
synced 2026-04-07 20:59:13 +08:00
Allow configuring certificate for nextcloud
This commit is contained in:
@@ -17,7 +17,7 @@ groups:
|
||||
portals:
|
||||
web_portal:
|
||||
protocols:
|
||||
- "http"
|
||||
- "$kubernetes-resource_configmap_nginx-configuration_protocol"
|
||||
host:
|
||||
- "$variable-nextcloud.host"
|
||||
ports:
|
||||
@@ -52,6 +52,15 @@ questions:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
- variable: certificate
|
||||
description: "Configure Certificate for Nextcloud"
|
||||
label: "Certificate Configuration"
|
||||
group: "Nextcloud Configuration"
|
||||
schema:
|
||||
type: int
|
||||
$ref:
|
||||
- "definitions/certificate"
|
||||
|
||||
- variable: nextcloud
|
||||
description: "Nextcloud configuration details"
|
||||
label: "Nextcloud Configuration"
|
||||
|
||||
@@ -10,6 +10,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
|
||||
command: ['sh', '-c', "until pg_isready -h {{ template "common.names.fullname" $postgres_values }}; do echo waiting for postgres; sleep 2; done"]
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
containers:
|
||||
{{ if eq (include "nginx.certAvailable" .) "true" }}
|
||||
- name: nginx
|
||||
{{ include "common.containers.imageConfig" .Values.nginx.image | nindent 8 }}
|
||||
volumeMounts:
|
||||
@@ -24,6 +25,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
|
||||
- name: nginx-https
|
||||
containerPort: 8443
|
||||
protocol: TCP
|
||||
{{ end }}
|
||||
- name: {{ .Chart.Name }}
|
||||
{{ include "common.containers.imageConfig" .Values.image | nindent 8 }}
|
||||
env: {{ include "postgres.envVariableConfiguration" $postgres_values | nindent 10 }}
|
||||
|
||||
@@ -3,6 +3,7 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: "nginx-configuration"
|
||||
data:
|
||||
protocol: {{ include "nginx.scheme" . }}
|
||||
config: |-
|
||||
http {
|
||||
# redirects all http requests to https requests
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{{ $svc := .Values.service }}
|
||||
{{ $ports := list }}
|
||||
{{ if eq (include "nginx.certAvailable" .) "true" }}
|
||||
{{ $ports = mustAppend $ports (dict "name" "nginx-https" "port" 8443 "nodePort" $svc.nodePort) }}
|
||||
{{ else }}
|
||||
{{ $ports = mustAppend $ports (dict "name" "http" "port" 80 "nodePort" $svc.nodePort) }}
|
||||
{{ end }}
|
||||
{{ $params := . }}
|
||||
{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
|
||||
{{ include "common.classes.service" $params }}
|
||||
|
||||
Reference in New Issue
Block a user