From 04ddaee8f21e6dd91e6e678ebbe104e062b31c8c Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sun, 4 Jul 2021 16:46:10 +0200 Subject: [PATCH] Move nextcloud probes to http/https instead of tcp (#652) * no message * back to tcp * no message * no message * try some tweaking of the probes * try again * use new common * try not using empty-dir * try setting type * more * size set * hmm * disable cron for now * mount html instead of www * use nextcloud user for initcontainer checkings * Try some more tweaking * hmmm * whoops * also try custom startup probe * reenable cronjob * cleaning --- charts/develop/nextcloud/Chart.yaml | 2 +- charts/develop/nextcloud/SCALE/ix_values.yaml | 50 ++++++++++---- charts/develop/nextcloud/SCALE/questions.yaml | 7 ++ .../nextcloud/templates/_configmap.tpl | 2 +- charts/develop/nextcloud/values.yaml | 65 ++++++++++++++----- 5 files changed, 94 insertions(+), 32 deletions(-) diff --git a/charts/develop/nextcloud/Chart.yaml b/charts/develop/nextcloud/Chart.yaml index 6fcfeaa8ee5..1c407e9d46b 100644 --- a/charts/develop/nextcloud/Chart.yaml +++ b/charts/develop/nextcloud/Chart.yaml @@ -35,4 +35,4 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm type: application -version: 1.0.18 +version: 1.0.19 diff --git a/charts/develop/nextcloud/SCALE/ix_values.yaml b/charts/develop/nextcloud/SCALE/ix_values.yaml index c97d17db9bd..24e7828181a 100644 --- a/charts/develop/nextcloud/SCALE/ix_values.yaml +++ b/charts/develop/nextcloud/SCALE/ix_values.yaml @@ -47,7 +47,7 @@ initContainers: command: - "sh" - "-c" - - "until pg_isready -h ${pghost} ; do sleep 2 ; done" + - "until pg_isready -U nextcloud -h ${pghost} ; do sleep 2 ; done" imagePullPolicy: IfNotPresent env: - name: pghost @@ -63,32 +63,56 @@ probes: # -- Liveness probe configuration # @default -- See below liveness: - # -- sets the probe type when not using a custom probe - # @default -- "TCP" - type: HTTP + custom: true # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used # @default -- "/" - path: /status.php + spec: + httpGet: + path: /status.php + port: 80 + httpHeaders: + - name: Host + value: "test.fakedomain.dns" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 2 + failureThreshold: 5 # -- Redainess probe configuration # @default -- See below readiness: - # -- sets the probe type when not using a custom probe - # @default -- "TCP" - type: HTTP + custom: true # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used # @default -- "/" - path: /status.php + spec: + httpGet: + path: /status.php + port: 80 + httpHeaders: + - name: Host + value: "test.fakedomain.dns" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 2 + failureThreshold: 5 # -- Startup probe configuration # @default -- See below startup: - # -- sets the probe type when not using a custom probe - # @default -- "TCP" - type: HTTP + custom: true # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used # @default -- "/" - path: /status.php + spec: + httpGet: + path: /status.php + port: 80 + httpHeaders: + - name: Host + value: "test.fakedomain.dns" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 2 + failureThreshold: 5 ## Cronjob to execute Nextcloud background tasks ## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron diff --git a/charts/develop/nextcloud/SCALE/questions.yaml b/charts/develop/nextcloud/SCALE/questions.yaml index e6472c95bce..0e940a77f12 100644 --- a/charts/develop/nextcloud/SCALE/questions.yaml +++ b/charts/develop/nextcloud/SCALE/questions.yaml @@ -124,6 +124,13 @@ questions: schema: type: string default: "172.16.0.0/16" + - variable: NODE_IP + label: "NODE_IP" + description: "Sets nextcloud nodeip for nodeport connections" + schema: + type: string + $ref: + - "definitions/nodeIP" # Configure Enviroment Variables diff --git a/charts/develop/nextcloud/templates/_configmap.tpl b/charts/develop/nextcloud/templates/_configmap.tpl index efb3060f3df..1569e5a3009 100644 --- a/charts/develop/nextcloud/templates/_configmap.tpl +++ b/charts/develop/nextcloud/templates/_configmap.tpl @@ -17,7 +17,7 @@ kind: ConfigMap metadata: name: nextcloudconfig data: - NEXTCLOUD_TRUSTED_DOMAINS: {{ $hosts | quote }} + NEXTCLOUD_TRUSTED_DOMAINS: {{ ( printf "%v %v %v" "test.fakedomain.dns" ( .Values.env.NODE_IP | default "localhost" ) $hosts ) | quote }} {{- if .Values.ingress.main.enabled }} APACHE_DISABLE_REWRITE_IP: "1" {{- end }} diff --git a/charts/develop/nextcloud/values.yaml b/charts/develop/nextcloud/values.yaml index e9b26889a1f..fca981ea226 100644 --- a/charts/develop/nextcloud/values.yaml +++ b/charts/develop/nextcloud/values.yaml @@ -48,20 +48,26 @@ envValueFrom: persistence: data: enabled: true - mountPath: "/var/www" - type: emptyDir + mountPath: "/var/www/html" + type: pvc + accessMode: ReadWriteOnce + size: "100Gi" db: noMount: true forceName: "db" enabled: true - type: emptyDir + type: pvc + accessMode: ReadWriteOnce + size: "100Gi" redismaster: noMount: true forceName: "redismaster" enabled: true - type: emptyDir + type: pvc + accessMode: ReadWriteOnce + size: "100Gi" initContainers: - name: init-postgresdb @@ -69,7 +75,7 @@ initContainers: command: - "sh" - "-c" - - "until pg_isready -h ${pghost} ; do sleep 2 ; done" + - "until pg_isready -U nextcloud -h ${pghost} ; do sleep 2 ; done" imagePullPolicy: IfNotPresent env: - name: pghost @@ -88,32 +94,57 @@ probes: # -- Liveness probe configuration # @default -- See below liveness: - # -- sets the probe type when not using a custom probe - # @default -- "TCP" - type: HTTP + custom: true # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used # @default -- "/" - path: /status.php + spec: + httpGet: + path: /status.php + port: 80 + httpHeaders: + - name: Host + value: "test.fakedomain.dns" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 2 + failureThreshold: 5 # -- Redainess probe configuration # @default -- See below readiness: - # -- sets the probe type when not using a custom probe - # @default -- "TCP" - type: HTTP + custom: true # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used # @default -- "/" - path: /status.php + spec: + httpGet: + path: /status.php + port: 80 + httpHeaders: + - name: Host + value: "test.fakedomain.dns" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 2 + failureThreshold: 5 # -- Startup probe configuration # @default -- See below startup: - # -- sets the probe type when not using a custom probe - # @default -- "TCP" - type: HTTP + custom: true # -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used # @default -- "/" - path: /status.php + spec: + httpGet: + path: /status.php + port: 80 + httpHeaders: + - name: Host + value: "test.fakedomain.dns" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 2 + failureThreshold: 5 + ## Cronjob to execute Nextcloud background tasks ## ref: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#webcron