Misc fixes (#647)

This commit is contained in:
Kjeld Schouten-Lebbing
2021-07-02 23:59:17 +02:00
committed by GitHub
parent ac6dd35a45
commit a85391d0ae
6 changed files with 103 additions and 26 deletions
+1 -1
View File
@@ -35,4 +35,4 @@ sources:
- https://github.com/nextcloud/docker - https://github.com/nextcloud/docker
- https://github.com/nextcloud/helm - https://github.com/nextcloud/helm
type: application type: application
version: 1.0.3 version: 1.0.5
+46 -8
View File
@@ -19,12 +19,10 @@ envTpl:
POSTGRES_DB: "{{ .Values.postgresql.postgresqlDatabase }}" POSTGRES_DB: "{{ .Values.postgresql.postgresqlDatabase }}"
POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}" POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: nextcloudconfig name: nextcloudconfig
envValueFrom: envValueFrom:
POSTGRES_PASSWORD: POSTGRES_PASSWORD:
secretKeyRef: secretKeyRef:
@@ -43,14 +41,54 @@ envValueFrom:
name: rediscreds name: rediscreds
key: redis-password key: redis-password
initContainers:
- name: init-postgresdb
image: postgres:13.1
command:
- "sh"
- "-c"
- "until pg_isready -h ${pghost} ; do sleep 2 ; done"
imagePullPolicy: IfNotPresent
env:
- name: pghost
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
# -- Probe configuration
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
# @default -- See below
probes: probes:
# -- Liveness probe configuration
# @default -- See below
liveness:
# -- sets the probe type when not using a custom probe
# @default -- "TCP"
type: HTTP
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
# @default -- "/"
path: /status.php
# -- Redainess probe configuration
# @default -- See below
readiness:
# -- sets the probe type when not using a custom probe
# @default -- "TCP"
type: HTTP
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
# @default -- "/"
path: /status.php
# -- Startup probe configuration
# @default -- See below
startup: startup:
spec: # -- sets the probe type when not using a custom probe
initialDelaySeconds: 3 # @default -- "TCP"
timeoutSeconds: 2 type: HTTP
## This means it has a maximum of 10*60=600 seconds to start up before it fails # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
periodSeconds: 10 # @default -- "/"
failureThreshold: 60 path: /status.php
## Cronjob to execute Nextcloud background tasks ## Cronjob to execute Nextcloud background tasks
## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron ## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron
@@ -18,4 +18,5 @@ metadata:
name: nextcloudconfig name: nextcloudconfig
data: data:
NEXTCLOUD_TRUSTED_DOMAINS: {{ $hosts | quote }} NEXTCLOUD_TRUSTED_DOMAINS: {{ $hosts | quote }}
{{- end -}} {{- end -}}
@@ -3,7 +3,7 @@
{{- $jobName := include "common.names.fullname" . -}} {{- $jobName := include "common.names.fullname" . -}}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1beta1
kind: CronJob kind: CronJob
metadata: metadata:
name: {{ printf "%s-cronjob" $jobName }} name: {{ printf "%s-cronjob" $jobName }}
@@ -23,6 +23,7 @@ data:
{{- end }} {{- end }}
url: {{ ( printf "%v%v:%v@%v-%v:%v/%v" "postgresql://" .Values.postgresql.postgresqlUsername $dbPass .Release.Name "postgresql" "5432" .Values.postgresql.postgresqlDatabase ) | b64enc | quote }} url: {{ ( printf "%v%v:%v@%v-%v:%v/%v" "postgresql://" .Values.postgresql.postgresqlUsername $dbPass .Release.Name "postgresql" "5432" .Values.postgresql.postgresqlDatabase ) | b64enc | quote }}
host: {{ ( printf "%v-%v:5432" .Release.Name "postgresql" ) | b64enc | quote }} host: {{ ( printf "%v-%v:5432" .Release.Name "postgresql" ) | b64enc | quote }}
plainhost: {{ ( printf "%v-%v" .Release.Name "postgresql" ) | b64enc | quote }}
type: Opaque type: Opaque
--- ---
+53 -16
View File
@@ -34,14 +34,14 @@ envValueFrom:
secretKeyRef: secretKeyRef:
name: dbcreds name: dbcreds
key: host key: host
# REDIS_HOST: REDIS_HOST:
# secretKeyRef: secretKeyRef:
# name: rediscreds name: rediscreds
# key: masterhost key: masterhost
# REDIS_PASSWORD: REDIS_PASSWORD:
# secretKeyRef: secretKeyRef:
# name: rediscreds name: rediscreds
# key: redis-password key: redis-password
persistence: persistence:
data: data:
@@ -63,20 +63,57 @@ persistence:
enabled: true enabled: true
type: emptyDir type: emptyDir
initContainers:
- name: init-postgresdb
image: postgres:13.1
command:
- "sh"
- "-c"
- "until pg_isready -h ${pghost} ; do sleep 2 ; done"
imagePullPolicy: IfNotPresent
env:
- name: pghost
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
podSecurityContext: podSecurityContext:
fsGroup: 33 fsGroup: 33
# test # -- Probe configuration
# -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
# @default -- See below
probes: probes:
startup: # -- Liveness probe configuration
spec: # @default -- See below
initialDelaySeconds: 3 liveness:
timeoutSeconds: 2 # -- sets the probe type when not using a custom probe
## This means it has a maximum of 10*60=600 seconds to start up before it fails # @default -- "TCP"
periodSeconds: 10 type: HTTP
failureThreshold: 60 # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
# @default -- "/"
path: /status.php
# -- Redainess probe configuration
# @default -- See below
readiness:
# -- sets the probe type when not using a custom probe
# @default -- "TCP"
type: HTTP
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
# @default -- "/"
path: /status.php
# -- Startup probe configuration
# @default -- See below
startup:
# -- sets the probe type when not using a custom probe
# @default -- "TCP"
type: HTTP
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
# @default -- "/"
path: /status.php
## Cronjob to execute Nextcloud background tasks ## Cronjob to execute Nextcloud background tasks
## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron ## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron