diff --git a/charts/nextcloud/Chart.lock b/charts/nextcloud/Chart.lock index 8440595fc23abae8e5c96da422ca2bd5d61509ec..0e1fefa49ac3c041abd9e9616b88a17a007759c3 100644 --- a/charts/nextcloud/Chart.lock +++ b/charts/nextcloud/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: mariadb repository: https://groundhog2k.github.io/helm-charts - version: 0.2.5 + version: 0.2.8 - name: postgres repository: https://groundhog2k.github.io/helm-charts - version: 0.2.5 + version: 0.2.7 - name: redis repository: https://groundhog2k.github.io/helm-charts - version: 0.2.6 -digest: sha256:fa9bed6e6400ef182cdde2faa464830007e6f3d68afd0a9f973d8f9c9d2e79cc -generated: "2021-01-15T17:40:35.2508472+01:00" + version: 0.2.8 +digest: sha256:4f91ed0a625d71d0d891bdfa301fb5cc1b3570bae9f7ed4038b8ec83de697cf7 +generated: "2021-02-03T18:51:10.7352492+01:00" diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 2f5222661e79320a5f509ac9be2f2e813d143314..907e66c9a99967403522093a4c1e182e35d80756 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -8,21 +8,21 @@ maintainers: - name: groundhog2k # This is the chart version. -version: 0.4.1 +version: 0.4.2 # This is the version number of the application being deployed. appVersion: "20.0.6-apache" dependencies: - name: mariadb - version: 0.2.5 + version: 0.2.8 repository: "https://groundhog2k.github.io/helm-charts" condition: mariadb.enabled - name: postgres - version: 0.2.5 + version: 0.2.7 repository: "https://groundhog2k.github.io/helm-charts" condition: postgres.enabled - name: redis - version: 0.2.6 + version: 0.2.8 repository: "https://groundhog2k.github.io/helm-charts" condition: redis.enabled diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index c1509bc52b88fea34ce33b992714e79ce75a444b..ed86b82b8236f3c06e3ba237bf92020252346fab 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -1,6 +1,6 @@ # Nextcloud -   +   A Helm chart for Nextcloud on Kubernetes @@ -62,9 +62,9 @@ $ helm uninstall my-release | Repository | Name | Version | |------------|------|---------| -| @groundhog2k | mariadb | 0.2.5 | -| @groundhog2k | postgres | 0.2.5 | -| @groundhog2k | redis | 0.2.6 | +| @groundhog2k | mariadb | 0.2.8 | +| @groundhog2k | postgres | 0.2.7 | +| @groundhog2k | redis | 0.2.8 | ## Common parameters @@ -81,8 +81,11 @@ $ helm uninstall my-release | image.repository | string | `"nextcloud"` | Image name | | image.tag | string | `""` | Image tag | | imagePullSecrets | list | `[]` | Image pull secrets | +| strategy.type | object | `"RollingUpdate"` | Pod deployment strategy | | livenessProbe | object | `see values.yaml` | Liveness probe configuration | | startupProbe | object | `see values.yaml` | Startup probe configuration | +| customLivenessProbe | object | `{}` | Custom liveness probe (overwrites default liveness probe configuration) | +| customStartupProbe | object | `{}` | Custom startup probe (overwrites default startup probe configuration) | | resources | object | `{}` | Resource limits and requests | | nodeSelector | object | `{}` | Deployment node selector | | podAnnotations | object | `{}` | Additional pod annotations | @@ -103,6 +106,7 @@ $ helm uninstall my-release | postUpgradeHook | bool | `false` | Enable post upgrade hook | | postUpgradeHookDelay | int | `10` | Delay in seconds before post-upgrade steps are initiated | | postUpgradeSteps | list | `see values.yaml` | Script with post upgrade steps | + ## Cron jobs | Key | Type | Default | Description | diff --git a/charts/nextcloud/charts/mariadb-0.2.5.tgz b/charts/nextcloud/charts/mariadb-0.2.5.tgz deleted file mode 100644 index 9f59f3f0cba3e7c41adec28d74b4994b910bcb19..0000000000000000000000000000000000000000 Binary files a/charts/nextcloud/charts/mariadb-0.2.5.tgz and /dev/null differ diff --git a/charts/nextcloud/charts/mariadb-0.2.8.tgz b/charts/nextcloud/charts/mariadb-0.2.8.tgz new file mode 100644 index 0000000000000000000000000000000000000000..19b04962300d9b10b6c7263a9dab310f9c2f186e Binary files /dev/null and b/charts/nextcloud/charts/mariadb-0.2.8.tgz differ diff --git a/charts/nextcloud/charts/postgres-0.2.5.tgz b/charts/nextcloud/charts/postgres-0.2.5.tgz deleted file mode 100644 index c2b41d43ffbc183aa96b8e09f0f01cfb08498002..0000000000000000000000000000000000000000 Binary files a/charts/nextcloud/charts/postgres-0.2.5.tgz and /dev/null differ diff --git a/charts/nextcloud/charts/postgres-0.2.7.tgz b/charts/nextcloud/charts/postgres-0.2.7.tgz new file mode 100644 index 0000000000000000000000000000000000000000..a8a63a1a22cfb6b9817154979215a15069d38d84 Binary files /dev/null and b/charts/nextcloud/charts/postgres-0.2.7.tgz differ diff --git a/charts/nextcloud/charts/redis-0.2.6.tgz b/charts/nextcloud/charts/redis-0.2.6.tgz deleted file mode 100644 index 33e97d1c370349664f5c508b831d5f4293856b8f..0000000000000000000000000000000000000000 Binary files a/charts/nextcloud/charts/redis-0.2.6.tgz and /dev/null differ diff --git a/charts/nextcloud/charts/redis-0.2.8.tgz b/charts/nextcloud/charts/redis-0.2.8.tgz new file mode 100644 index 0000000000000000000000000000000000000000..890c3f1ce896a1b74e90e801d933eb4b80859762 Binary files /dev/null and b/charts/nextcloud/charts/redis-0.2.8.tgz differ diff --git a/charts/nextcloud/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index bd7089767bf823df260f519379b558c48ec34da9..66b638c0aaad095d28a2169a9afcf5d6606867e1 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -108,30 +108,56 @@ Nextcloud specific environment variables {{- $internal := include "nextcloud.fullname" . }} {{- with .Values.settings }} - name: NEXTCLOUD_TRUSTED_DOMAINS - value: {{ $internal }} {{ .trustedDomains | default ("") }} + {{- if .trustedDomains }} + value: {{ (printf "%s %s" $internal .trustedDomains) | quote }} + {{- else }} + value: {{ $internal | quote }} + {{- end }} {{- if .disableRewriteIP }} - name: APACHE_DISABLE_REWRITE_IP - value: {{ .disableRewriteIP }} + value: {{ .disableRewriteIP | quote }} {{- end }} {{- if .trustedProxies }} - name: TRUSTED_PROXIES - value: {{ .trustedProxies }} + value: {{ .trustedProxies | quote }} {{- end }} {{- if .overwriteHost }} - name: OVERWRITEHOST - value: {{ .overwriteHost }} + value: {{ .overwriteHost | quote }} {{- end }} {{- if .overwriteProtocol }} - name: OVERWRITEPROTOCOL - value: {{ .overwriteProtocol }} + value: {{ .overwriteProtocol | quote }} {{- end }} {{- if .overwriteWebRoot }} - name: OVERWRITEWEBROOT - value: {{ .overwriteWebRoot }} + value: {{ .overwriteWebRoot | quote }} {{- end }} {{- if .overwriteCondAddr }} - name: OVERWRITECONDADDR - value: {{ .overwriteCondAddr }} -{{- end }} + value: {{ .overwriteCondAddr | quote }} +{{- end }} +{{- end }} +{{- with .Values.settings.smtp }} + {{- if .enabled }} +- name: SMTP_HOST + value: {{ .host | quote }} +- name: SMTP_PORT + value: {{ .port | quote }} + {{- if .secure }} +- name: SMTP_SECURE + value: "ssl" + {{- end }} +- name: SMTP_AUTHTYPE + value: {{ .authType | quote }} + {{- if .from }} +- name: MAIL_FROM_ADDRESS + value: {{ .from | quote }} + {{- end }} + {{- if .domain }} +- name: MAIL_DOMAIN + value: {{ .domain | quote }} + {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index 5c00354509f66506c14def13f512e772eae6fc92..c9d7ac9de896a3c33e41dac3206008fe95adc81b 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -6,15 +6,19 @@ metadata: {{- include "nextcloud.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicas }} - strategy: - type: RollingUpdate + {{- with .Values.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "nextcloud.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + checksum/secureconfig: {{ include (print $.Template.BasePath "/secureconfig.yaml") . | sha256sum }} + checksum/extendedconfig: {{ include (print $.Template.BasePath "/extendedconfig.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -64,6 +68,10 @@ spec: - name: http containerPort: {{ .Values.containerPort }} protocol: TCP + {{- if .Values.customLivenessProbe }} + livenessProbe: + {{- toYaml .Values.customLivenessProbe | nindent 12 }} + {{- else }} {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: @@ -80,6 +88,11 @@ spec: periodSeconds: {{ .periodSeconds }} {{- end }} {{- end }} + {{- end }} + {{- if .Values.customStartupProbe }} + startupProbe: + {{- toYaml .Values.customStartupProbe | nindent 12 }} + {{- else }} {{- if .Values.startupProbe.enabled }} startupProbe: httpGet: @@ -96,6 +109,7 @@ spec: periodSeconds: {{ .periodSeconds }} {{- end }} {{- end }} + {{- end }} {{- with .Values.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/charts/nextcloud/templates/extended-config.yaml b/charts/nextcloud/templates/extendedconfig.yaml similarity index 100% rename from charts/nextcloud/templates/extended-config.yaml rename to charts/nextcloud/templates/extendedconfig.yaml diff --git a/charts/nextcloud/templates/secureconfig.yaml b/charts/nextcloud/templates/secureconfig.yaml index 65e0ce146c42e3048fc77a9643ee881354a885ca..6b316d3cc109b4f203ed143dba94cb3be55276e2 100644 --- a/charts/nextcloud/templates/secureconfig.yaml +++ b/charts/nextcloud/templates/secureconfig.yaml @@ -4,82 +4,66 @@ metadata: name: {{ include "nextcloud.fullname" . }} labels: {{- include "nextcloud.labels" . | nindent 4 }} -stringData: +data: {{- if .Values.mariadb.enabled }} - MYSQL_HOST: {{ include "mariadb.servicename" . }} + MYSQL_HOST: {{ (include "mariadb.servicename" .) | b64enc }} {{- with .Values.mariadb.userDatabase }} - MYSQL_DATABASE: {{ .name }} - MYSQL_USER: {{ .user }} - MYSQL_PASSWORD: {{ .password }} + MYSQL_DATABASE: {{ .name | b64enc }} + MYSQL_USER: {{ .user | b64enc }} + MYSQL_PASSWORD: {{ .password | b64enc }} {{- end }} {{- else }} {{- if .Values.postgres.enabled }} - POSTGRES_HOST: {{ include "postgres.servicename" . }} + POSTGRES_HOST: {{ (include "postgres.servicename" .) | b64enc }} {{- with .Values.postgres.userDatabase }} - POSTGRES_DB: {{ .name }} - POSTGRES_USER: {{ .user }} - POSTGRES_PASSWORD: {{ .password }} + POSTGRES_DB: {{ .name | b64enc }} + POSTGRES_USER: {{ .user | b64enc }} + POSTGRES_PASSWORD: {{ .password | b64enc }} {{- end }} {{- else }} {{- with .Values.externalDatabase }} {{- if or (eq .type "mariadb") (eq .type "mysql") }} - MYSQL_DATABASE: {{ .name }} - MYSQL_USER: {{ .user }} - MYSQL_PASSWORD: {{ .password }} - MYSQL_HOST: {{ .host }} + MYSQL_DATABASE: {{ .name | b64enc }} + MYSQL_USER: {{ .user | b64enc }} + MYSQL_PASSWORD: {{ .password | b64enc }} + MYSQL_HOST: {{ .host | b64enc }} {{- else if eq .type "postgres" }} - POSTGRES_DB: {{ .name }} - POSTGRES_USER: {{ .user }} - POSTGRES_PASSWORD: {{ .password }} - POSTGRES_HOST: {{ .host }} + POSTGRES_DB: {{ .name | b64enc }} + POSTGRES_USER: {{ .user | b64enc }} + POSTGRES_PASSWORD: {{ .password | b64enc }} + POSTGRES_HOST: {{ .host | b64enc }} {{- else if eq .type "sqlite" }} - SQLITE_DATABASE: {{ .name }} + SQLITE_DATABASE: {{ .name | b64enc }} {{- end }} {{- end }} {{- end }} {{- end }} {{- if .Values.redis.enabled }} - REDIS_HOST: {{ include "redis.servicename" . }} - REDIS_HOST_PORT: {{ .Values.redis.service.port | quote }} + REDIS_HOST: {{ (include "redis.servicename" .) | b64enc }} + REDIS_HOST_PORT: {{ (.Values.redis.service.port | toString) | b64enc }} {{- if .Values.redis.password }} - REDIS_HOST_PASSWORD: {{ .Values.redis.password | quote }} - {{- else }} - REDIS_HOST_PASSWORD: "" + REDIS_HOST_PASSWORD: {{ .Values.redis.password | b64enc }} {{- end }} {{- else }} {{- with .Values.externalCache }} {{- if .enabled }} - REDIS_HOST: {{ .host }} - REDIS_HOST_PORT: {{ .port | quote }} + REDIS_HOST: {{ .host | b64enc }} + REDIS_HOST_PORT: {{ (.port | toString) | b64enc }} {{- if .password }} - REDIS_HOST_PASSWORD: {{ .password | quote }} - {{- else }} - REDIS_HOST_PASSWORD: "" + REDIS_HOST_PASSWORD: {{ .password | b64enc }} {{- end }} {{- end }} {{- end }} {{- end }} {{- with .Values.settings.admin }} {{- if .name }} - NEXTCLOUD_ADMIN_USER: {{ .name }} - NEXTCLOUD_ADMIN_PASSWORD: {{ .password | default (randAlphaNum 10) }} + NEXTCLOUD_ADMIN_USER: {{ .name | b64enc }} + NEXTCLOUD_ADMIN_PASSWORD: {{ required "Values: settings.admin.password is mandatory if name is specified." .password | b64enc }} {{- end }} {{- end }} {{- with .Values.settings.smtp }} {{- if .enabled }} - SMTP_HOST: {{ .host }} - SMTP_PORT: {{ .port | quote }} - {{- if .secure }} - SMTP_SECURE: "ssl" - {{- end }} - SMTP_AUTHTYPE: {{ .authType }} - SMTP_NAME: {{ .name }} - SMTP_PASSWORD: {{ .password | quote }} - {{- if .from }} - MAIL_FROM_ADDRESS: {{ .from }} - {{- end }} - {{- if .domain }} - MAIL_DOMAIN: {{ .domain }} - {{- end }} + SMTP_NAME: {{ .name | b64enc }} + SMTP_PASSWORD: {{ .password | b64enc }} {{- end }} {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 55fe33b8c69a1ae5a983e024a56476a771e62ae4..7e5095b9e0424819bc54c5a0afc39abc180eea0a 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -18,6 +18,10 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +## Pod deployment strategy +strategy: + type: RollingUpdate + ## Internal default cron jobs (cron.php) defaultCronJobs: - name: cronphp @@ -112,6 +116,9 @@ resources: {} # cpu: 100m # memory: 128Mi +## Custom liveness probe (overwrites default liveness probe) +customLivenessProbe: {} + ## Default liveness probe livenessProbe: enabled: true @@ -121,6 +128,9 @@ livenessProbe: successThreshold: 1 periodSeconds: 10 +## Custom startup probe (overwrites default startup probe) +customStartupProbe: {} + ## Default startup probe startupProbe: enabled: true @@ -187,7 +197,7 @@ externalCache: ## Nextcloud specific configuration settings: - ## Enable update processing (Only necessary if custom command is use) + ## Enable update processing (Only necessary if custom command is used) update: false ## Maximum file upload size (default: 64M)