From 70f6591f6648a4a7c54f4cd1dc63134a4df65db5 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Fri, 24 Mar 2023 21:28:28 +0000 Subject: [PATCH] Update catalog information --- catalog.json | 8 +- charts/nextcloud/1.6.19/.helmignore | 21 ++ charts/nextcloud/1.6.19/Chart.lock | 6 + charts/nextcloud/1.6.19/Chart.yaml | 29 ++ charts/nextcloud/1.6.19/README.md | 11 + charts/nextcloud/1.6.19/app-readme.md | 3 + .../1.6.19/charts/common-2207.0.0.tgz | Bin 0 -> 4974 bytes charts/nextcloud/1.6.19/ci/test-values.yaml | 36 ++ charts/nextcloud/1.6.19/ix_values.yaml | 10 + .../1.6.19/migrations/migrate_from_1.1.0 | 26 ++ charts/nextcloud/1.6.19/questions.yaml | 356 ++++++++++++++++++ charts/nextcloud/1.6.19/templates/NOTES.txt | 3 + charts/nextcloud/1.6.19/templates/_nginx.tpl | 79 ++++ .../nextcloud/1.6.19/templates/_postgres.tpl | 49 +++ .../templates/backup-postgres-config.yaml | 15 + .../templates/backup-postgres-hook.yaml | 39 ++ .../nextcloud/1.6.19/templates/cronjob.yaml | 49 +++ .../1.6.19/templates/deployment.yaml | 200 ++++++++++ .../1.6.19/templates/nginx-configmap.yaml | 67 ++++ .../1.6.19/templates/nginx-secret.yaml | 10 + .../templates/nuke-deployments-hook.yaml | 24 ++ .../1.6.19/templates/postgres-deployment.yaml | 50 +++ .../1.6.19/templates/postgres-secret.yaml | 22 ++ .../1.6.19/templates/postgres-service.yaml | 6 + .../nextcloud/1.6.19/templates/secrets.yaml | 13 + .../nextcloud/1.6.19/templates/service.yaml | 10 + .../1.6.19/templates/serviceaccount.yaml | 35 ++ charts/nextcloud/item.yaml | 3 + 28 files changed, 1176 insertions(+), 4 deletions(-) create mode 100644 charts/nextcloud/1.6.19/.helmignore create mode 100644 charts/nextcloud/1.6.19/Chart.lock create mode 100644 charts/nextcloud/1.6.19/Chart.yaml create mode 100644 charts/nextcloud/1.6.19/README.md create mode 100644 charts/nextcloud/1.6.19/app-readme.md create mode 100644 charts/nextcloud/1.6.19/charts/common-2207.0.0.tgz create mode 100644 charts/nextcloud/1.6.19/ci/test-values.yaml create mode 100644 charts/nextcloud/1.6.19/ix_values.yaml create mode 100755 charts/nextcloud/1.6.19/migrations/migrate_from_1.1.0 create mode 100644 charts/nextcloud/1.6.19/questions.yaml create mode 100644 charts/nextcloud/1.6.19/templates/NOTES.txt create mode 100644 charts/nextcloud/1.6.19/templates/_nginx.tpl create mode 100644 charts/nextcloud/1.6.19/templates/_postgres.tpl create mode 100644 charts/nextcloud/1.6.19/templates/backup-postgres-config.yaml create mode 100644 charts/nextcloud/1.6.19/templates/backup-postgres-hook.yaml create mode 100644 charts/nextcloud/1.6.19/templates/cronjob.yaml create mode 100644 charts/nextcloud/1.6.19/templates/deployment.yaml create mode 100644 charts/nextcloud/1.6.19/templates/nginx-configmap.yaml create mode 100644 charts/nextcloud/1.6.19/templates/nginx-secret.yaml create mode 100644 charts/nextcloud/1.6.19/templates/nuke-deployments-hook.yaml create mode 100644 charts/nextcloud/1.6.19/templates/postgres-deployment.yaml create mode 100644 charts/nextcloud/1.6.19/templates/postgres-secret.yaml create mode 100644 charts/nextcloud/1.6.19/templates/postgres-service.yaml create mode 100644 charts/nextcloud/1.6.19/templates/secrets.yaml create mode 100644 charts/nextcloud/1.6.19/templates/service.yaml create mode 100644 charts/nextcloud/1.6.19/templates/serviceaccount.yaml create mode 100644 charts/nextcloud/item.yaml diff --git a/catalog.json b/catalog.json index c724d15a31..7a9bbb6f37 100644 --- a/catalog.json +++ b/catalog.json @@ -33,7 +33,7 @@ "latest_version": "1.0.13", "latest_app_version": "2023.02.2", "latest_human_version": "2023.02.2_1.0.13", - "last_update": "2023-03-24 21:24:51", + "last_update": "2023-03-24 21:25:31", "name": "pihole", "recommended": false, "title": "Pi-hole", @@ -122,10 +122,10 @@ "healthy": true, "healthy_error": null, "location": "/__w/charts/charts/charts/nextcloud", - "latest_version": "1.6.18", + "latest_version": "1.6.19", "latest_app_version": "25.0.4", - "latest_human_version": "25.0.4_1.6.18", - "last_update": "2023-02-27 10:12:34", + "latest_human_version": "25.0.4_1.6.19", + "last_update": "2023-03-24 21:27:53", "name": "nextcloud", "recommended": false, "title": "Nextcloud", diff --git a/charts/nextcloud/1.6.19/.helmignore b/charts/nextcloud/1.6.19/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/charts/nextcloud/1.6.19/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/nextcloud/1.6.19/Chart.lock b/charts/nextcloud/1.6.19/Chart.lock new file mode 100644 index 0000000000..cbceab51a7 --- /dev/null +++ b/charts/nextcloud/1.6.19/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common/2207.0.0 + version: 2207.0.0 +digest: sha256:a301ba0f99ec1e08a60a7f0a0320aa02d225993572f2f056f09520f06df88b37 +generated: "2023-03-22T15:32:05.580526674Z" diff --git a/charts/nextcloud/1.6.19/Chart.yaml b/charts/nextcloud/1.6.19/Chart.yaml new file mode 100644 index 0000000000..3001d482eb --- /dev/null +++ b/charts/nextcloud/1.6.19/Chart.yaml @@ -0,0 +1,29 @@ +name: nextcloud +description: A file sharing server that puts the control and security of your own + data back into your hands. +annotations: + title: Nextcloud +type: application +version: 1.6.19 +apiVersion: v2 +appVersion: '25.0.4' +kubeVersion: '>=1.16.0-0' +maintainers: + - name: truenas + url: https://www.truenas.com/ +dependencies: + - name: common + repository: file://../../../common/2207.0.0 + version: 2207.0.0 +home: https://nextcloud.com/ +icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg +sources: + - https://github.com/nextcloud/docker + - https://github.com/nextcloud/helm + - https://github.com/truenas/charts/tree/master/library/ix-dev/charts/nextcloud +keywords: + - nextcloud + - storage + - http + - web + - php diff --git a/charts/nextcloud/1.6.19/README.md b/charts/nextcloud/1.6.19/README.md new file mode 100644 index 0000000000..28f3c66405 --- /dev/null +++ b/charts/nextcloud/1.6.19/README.md @@ -0,0 +1,11 @@ +# nextcloud + +[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands. + +## Introduction + +This chart bootstraps an [nextcloud](https://hub.docker.com/_/nextcloud/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Configuration + +Please refer to questions.yaml for a detailed overview on supported configurable values. diff --git a/charts/nextcloud/1.6.19/app-readme.md b/charts/nextcloud/1.6.19/app-readme.md new file mode 100644 index 0000000000..f2e78c31f9 --- /dev/null +++ b/charts/nextcloud/1.6.19/app-readme.md @@ -0,0 +1,3 @@ +# nextcloud + +[nextcloud](https://nextcloud.com/) is a file sharing server that puts the control and security of your own data back into your hands. diff --git a/charts/nextcloud/1.6.19/charts/common-2207.0.0.tgz b/charts/nextcloud/1.6.19/charts/common-2207.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..377bba19a1c0364e0d479017e921e05cb41f5455 GIT binary patch literal 4974 zcmV-!6Ors6iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH<$bKAC-{j6VcmPzN@*_wLzwd0x2tk=%H^)z)daVGb6c6MBd zge24?zyP2eZR-8)J9v@cOOowaNm}89Es_TZ2f%sp-~fzRnljoyn;|a41xl0eK7Sbu z27{x61O0z67}Wm{MuWk3!-Ipt(b4eu@aX8f!EkhNJopXc8lnX(j+W^I)gG_o9Dy*ZcHo4`Mta6hmN`C9HBt z0DE_Ly^0)&5`;yzPp$bXa|Av`_s85F<@`5zsO4(jrMxWASEjT9~a?`A}RV*#x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a7 zu>JnaX38^oWk2eFw(O(+>YfJZ^oipUdMGEq1*$fob(aPmL#}ELMu$E zv?#}M9$`okp%PQ1kVZ_$g39JCa{cw>T /postgres_backups/$BACKUP_NAME; diff --git a/charts/nextcloud/1.6.19/templates/backup-postgres-hook.yaml b/charts/nextcloud/1.6.19/templates/backup-postgres-hook.yaml new file mode 100644 index 0000000000..175b0f2617 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/backup-postgres-hook.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ixChartContext.isUpgrade -}} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +apiVersion: batch/v1 +kind: Job +metadata: + name: "pre-upgrade-hook2" + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "1" + "helm.sh/hook-delete-policy": hook-succeeded + rollme: {{ randAlphaNum 5 | quote }} +spec: + template: + metadata: + name: "pre-upgrade-hook2" + spec: + restartPolicy: Never + serviceAccountName: "{{ template "common.names.serviceAccountName" . }}" + containers: + - name: {{ .Chart.Name }}-postgres-backup + image: {{ template "postgres.imageName" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }} + - name: BACKUP_NAME + value: {{ template "postgres.backupName" . }} + volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }} + - name: backup-script-configmap + mountPath: /bin/backup_entrypoint.sh + readOnly: true + subPath: entrypoint.sh + command: + - "/bin/backup_entrypoint.sh" + volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }} + - name: backup-script-configmap + configMap: + defaultMode: 0700 + name: "postgres-backup-hook-config-map" +{{- end -}} diff --git a/charts/nextcloud/1.6.19/templates/cronjob.yaml b/charts/nextcloud/1.6.19/templates/cronjob.yaml new file mode 100644 index 0000000000..2d3b650700 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/cronjob.yaml @@ -0,0 +1,49 @@ +{{ $cronjob_values := (. | mustDeepCopy) }} +{{ $_ := set $cronjob_values "common" (dict "nameSuffix" "cronjob") }} + +{{ $hostName := .Values.nextcloud.host }} +{{ if .Values.useServiceNameForHost }} +{{ $hostName = (include "common.names.fullname" .) }} +{{ end }} + +{{if .Values.cronjob.enabled }} +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ template "common.names.fullname" $cronjob_values }} + labels: + app: {{ template "common.names.name" $cronjob_values }} + chart: {{ template "common.names.chart" $cronjob_values }} + release: {{ .Release.Name }} + annotations: + rollme: {{ randAlphaNum 5 | quote }} +spec: + schedule: "{{ .Values.cronjob.schedule }}" + concurrencyPolicy: Forbid + failedJobsHistoryLimit: 2 + successfulJobsHistoryLimit: 1 + jobTemplate: + metadata: + labels: + app: {{ template "common.names.name" $cronjob_values }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" $cronjob_values | nindent 8 }} + spec: + template: + metadata: + labels: + app: {{ template "common.names.name" $cronjob_values }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" $cronjob_values | nindent 12 }} + spec: + restartPolicy: Never + containers: + - name: {{ .Chart.Name }}-cronjob + image: "{{.Values.image.repository }}:{{.Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.certificate }} + command: [ "curl" ,"-k" , "https://{{ $hostName }}:{{.Values.service.nodePort}}/cron.php"] + {{- else }} + command: [ "curl" , "http://{{ $hostName }}:{{.Values.service.nodePort}}/cron.php"] + {{- end }} +{{ end }} diff --git a/charts/nextcloud/1.6.19/templates/deployment.yaml b/charts/nextcloud/1.6.19/templates/deployment.yaml new file mode 100644 index 0000000000..15c62bdd12 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/deployment.yaml @@ -0,0 +1,200 @@ +{{ include "common.storage.hostPathValidate" .Values }} +{{ $postgres_values := (. | mustDeepCopy) }} +{{ $_ := set $postgres_values "common" (dict "nameSuffix" "postgres") }} +{{ include "common.deployment.common_config" . | nindent 0 }} +spec: {{ include "common.deployment.common_spec" . | nindent 2 }} + template: {{ include "common.deployment.pod.metadata" . | nindent 4 }} + spec: + initContainers: + - name: init-postgresdb + image: {{ template "postgres.imageName" . }} + command: ['sh', '-c', "until pg_isready -U $POSTGRES_USER -d {{ include "postgres.DatabaseName" .Values }} -h {{ template "common.names.fullname" $postgres_values }}; do echo waiting for postgres; sleep 2; done"] + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: {{ include "postgres.envVariableConfiguration" $postgres_values | nindent 10 }} + + containers: + {{ if eq (include "nginx.certAvailable" .) "true" }} + - name: nginx + {{ include "common.containers.imageConfig" .Values.nginx.image | nindent 8 }} + volumeMounts: + - name: nginx-configuration + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + {{ include "nginx.tlsKeysVolumeMount" . | nindent 10 }} + ports: + - name: nginx-http + containerPort: 8000 + protocol: TCP + - name: nginx-https + containerPort: 443 + protocol: TCP + livenessProbe: + httpGet: + scheme: HTTPS + path: /status.php + port: 443 + httpHeaders: + - name: Host + value: localhost + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + readinessProbe: + httpGet: + scheme: HTTPS + path: /status.php + port: 443 + httpHeaders: + - name: Host + value: localhost + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 2 + startupProbe: + httpGet: + scheme: HTTPS + path: /status.php + port: 443 + httpHeaders: + - name: Host + value: localhost + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 2 + failureThreshold: 60 + successThreshold: 1 + {{ end }} + - name: {{ .Chart.Name }} + {{ include "common.resources.limitation" . | nindent 8 }} + {{ include "common.containers.imageConfig" .Values.image | nindent 8 }} + env: {{ include "postgres.envVariableConfiguration" $postgres_values | nindent 10 }} + {{ $secretName := (include "common.names.fullname" .) }} + {{ $envList := (default list .Values.environmentVariables) }} + {{ $envList = mustAppend $envList (dict "name" "POSTGRES_HOST" "value" (printf "%s:5432" (include "common.names.fullname" $postgres_values))) }} + {{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }} + {{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_DATA_DIR" "value" .Values.nextcloud.datadir) }} + {{ if eq (include "nginx.certAvailable" .) "true" }} + {{ $envList = mustAppend $envList (dict "name" "APACHE_DISABLE_REWRITE_IP" "value" "1") }} + {{ $envList = mustAppend $envList (dict "name" "OVERWRITEHOST" "value" (printf "%v:%v" .Values.nextcloud.host .Values.service.nodePort)) }} + {{ $envList = mustAppend $envList (dict "name" "OVERWRITEPROTOCOL" "value" "https") }} + {{ $envList = mustAppend $envList (dict "name" "TRUSTED_PROXIES" "value" "127.0.0.1") }} + {{ end }} + {{ $hostName := .Values.nextcloud.host }} + {{ if .Values.useServiceNameForHost }} + {{ $hostName = (include "common.names.fullname" .) }} + {{ end }} + {{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_TRUSTED_DOMAINS" "value" $hostName) }} + {{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_ADMIN_USER" "valueFromSecret" true "secretName" $secretName "secretKey" "nextcloud-username") }} + {{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_ADMIN_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "nextcloud-password") }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 10 }} + ports: + - name: http + containerPort: 80 + protocol: TCP + livenessProbe: + httpGet: + path: /status.php + port: http + httpHeaders: + - name: Host + value: localhost + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + readinessProbe: + httpGet: + path: /status.php + port: http + httpHeaders: + - name: Host + value: localhost + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + startupProbe: + {{- if .Values.nextcloud.install_ffmpeg }} + exec: + command: + - /bin/sh + - -c + - | + command -v ffmpeg /dev/null 2>&1 || exit 1 + {{- else }} + httpGet: + path: /status.php + port: http + httpHeaders: + - name: Host + value: localhost + {{- end }} + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + volumeMounts: + - name: nextcloud-data + mountPath: /var/www/ + subPath: "root" + - name: nextcloud-data + mountPath: /var/www/html + subPath: "html" + - name: nextcloud-data + mountPath: {{ .Values.nextcloud.datadir }} + subPath: "data" + - name: nextcloud-data + mountPath: /var/www/html/config + subPath: "config" + - name: nextcloud-data + mountPath: /var/www/html/custom_apps + subPath: "custom_apps" + - name: nextcloud-data + mountPath: /var/www/tmp + subPath: "tmp" + - name: nextcloud-data + mountPath: /var/www/html/themes + subPath: "themes" + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} + {{- if .Values.nextcloud.install_ffmpeg }} + lifecycle: + postStart: + exec: + command: + - /bin/sh + - -c + - | + echo "Installing ffmpeg..." + apt update && \ + apt install -y --no-install-recommends \ + ffmpeg || echo "Failed to install ffmpeg" + echo "Finished." + {{- end }} +{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }} + volumes: + - name: nginx-configuration + configMap: + defaultMode: 0700 + name: "nginx-configuration" +{{ include "nginx.tlsKeysVolume" . | nindent 8 }} +{{ if .Values.appVolumeMounts }} +{{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} +{{ end }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} + # Will mount configuration files as www-data (id: 33) for nextcloud + securityContext: + fsGroup: 33 diff --git a/charts/nextcloud/1.6.19/templates/nginx-configmap.yaml b/charts/nextcloud/1.6.19/templates/nginx-configmap.yaml new file mode 100644 index 0000000000..a10f4bde6d --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/nginx-configmap.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "nginx-configuration" +data: + protocol: {{ include "nginx.scheme" . }} + nginx.conf: |- + events {} + http { + # redirects all http requests to https requests + server { + listen 8000 default_server; + listen [::]:8000 default_server; + return 301 https://$host$request_uri; + } + + server { + server_name localhost; + + listen 443 ssl http2; + listen [::]:433 ssl http2; + + ssl_certificate '/etc/nginx-certs/public.crt'; + ssl_certificate_key '/etc/nginx-certs/private.key'; + + # maximum 3GB Upload File; change to fit your needs + client_max_body_size 3G; + + add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" always; + + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + + location = /.well-known/carddav { + return 301 $scheme://$host/remote.php/dav; + } + + location = /.well-known/caldav { + return 301 $scheme://$host/remote.php/dav; + } + + location / { + proxy_pass http://localhost; + proxy_http_version 1.1; + proxy_cache_bypass $http_upgrade; + proxy_request_buffering off; + + # Proxy headers + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + + # Proxy timeouts + proxy_connect_timeout 60s; + proxy_send_timeout 60s; + proxy_read_timeout 60s; + } + } + } diff --git a/charts/nextcloud/1.6.19/templates/nginx-secret.yaml b/charts/nextcloud/1.6.19/templates/nginx-secret.yaml new file mode 100644 index 0000000000..978441509f --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/nginx-secret.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "nginx.secretName" . }} +type: Opaque +data: + {{ if eq (include "nginx.certAvailable" .) "true" }} + certPublicKey: {{ (include "nginx.cert.publicKey" .) | toString | b64enc | quote }} + certPrivateKey: {{ (include "nginx.cert.privateKey" .) | toString | b64enc | quote }} + {{ end }} diff --git a/charts/nextcloud/1.6.19/templates/nuke-deployments-hook.yaml b/charts/nextcloud/1.6.19/templates/nuke-deployments-hook.yaml new file mode 100644 index 0000000000..218ea00220 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/nuke-deployments-hook.yaml @@ -0,0 +1,24 @@ +{{- if .Values.ixChartContext.isUpgrade -}} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +apiVersion: batch/v1 +kind: Job +metadata: + name: "pre-upgrade-hook1" + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-weight": "-1" + "helm.sh/hook-delete-policy": hook-succeeded + rollme: {{ randAlphaNum 5 | quote }} +spec: + template: + metadata: + name: "pre-upgrade-hook1" + spec: + restartPolicy: Never + serviceAccountName: "{{ template "common.names.serviceAccountName" . }}" + containers: + - name: kubectl + image: "bitnami/kubectl:1.19" + command: ["kubectl", "delete" , "deployment", "{{ template "common.names.fullname" . }}", "{{ template "common.names.fullname" $values }}"] +{{- end -}} diff --git a/charts/nextcloud/1.6.19/templates/postgres-deployment.yaml b/charts/nextcloud/1.6.19/templates/postgres-deployment.yaml new file mode 100644 index 0000000000..b91bb90bd7 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/postgres-deployment.yaml @@ -0,0 +1,50 @@ +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +{{ include "common.deployment.common_config" $values | nindent 0 }} +spec: {{ include "common.deployment.common_spec" $values | nindent 2 }} + template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }} + spec: + containers: + - name: {{ .Chart.Name }}-postgres + image: {{ template "postgres.imageName" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }} + volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }} + ports: + - name: postgres-tcp + containerPort: 5432 + protocol: TCP + readinessProbe: + exec: + command: + - sh + - -c + - "until pg_isready -U ${POSTGRES_USER} -h localhost; do sleep 2; done" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 2 + livenessProbe: + exec: + command: + - sh + - -c + - "until pg_isready -U ${POSTGRES_USER} -h localhost; do sleep 2; done" + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + startupProbe: + exec: + command: + - sh + - -c + - "until pg_isready -U ${POSTGRES_USER} -h localhost; do sleep 2; done" + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 2 + failureThreshold: 60 + successThreshold: 1 + volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }} diff --git a/charts/nextcloud/1.6.19/templates/postgres-secret.yaml b/charts/nextcloud/1.6.19/templates/postgres-secret.yaml new file mode 100644 index 0000000000..2ebc8b9b17 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/postgres-secret.yaml @@ -0,0 +1,22 @@ +{{- $secretName := "db-details" }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} +data: + {{/* + Lookup for the user shouldn't be needed in normal circumstances + But there was a typo before that resulted to a db-user with weird + characters. So to keep that user for existing installations we retrieve + it from the existing secret. + */}} + {{ with (lookup "v1" "Secret" .Release.Namespace $secretName)}} + db-user: {{ index .data "db-user" }} + {{ else }} + db-user: {{ (include "postgres.DatabaseName" .Values ) | b64enc }} + {{ end }} + {{ with (lookup "v1" "Secret" .Release.Namespace $secretName) }} + db-password: {{ index .data "db-password" }} + {{ else }} + db-password: {{ randAlphaNum 15 | b64enc }} + {{ end }} diff --git a/charts/nextcloud/1.6.19/templates/postgres-service.yaml b/charts/nextcloud/1.6.19/templates/postgres-service.yaml new file mode 100644 index 0000000000..c6603fd62b --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/postgres-service.yaml @@ -0,0 +1,6 @@ +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "postgres-tcp" "port" 5432 "targetPort" 5432) }} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }} +{{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} +{{ include "common.classes.service" $values }} diff --git a/charts/nextcloud/1.6.19/templates/secrets.yaml b/charts/nextcloud/1.6.19/templates/secrets.yaml new file mode 100644 index 0000000000..eb992940b3 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/secrets.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels" . | nindent 4 }} +type: Opaque +data: + nextcloud-username: {{ .Values.nextcloud.username | b64enc | quote }} + {{ if .Values.nextcloud.password }} + nextcloud-password: {{ .Values.nextcloud.password | b64enc | quote }} + {{ else }} + nextcloud-password: {{ randAlphaNum 10 | b64enc | quote }} + {{ end }} diff --git a/charts/nextcloud/1.6.19/templates/service.yaml b/charts/nextcloud/1.6.19/templates/service.yaml new file mode 100644 index 0000000000..14c751eada --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/service.yaml @@ -0,0 +1,10 @@ +{{ $svc := .Values.service }} +{{ $ports := list }} +{{ if eq (include "nginx.certAvailable" .) "true" }} +{{ $ports = mustAppend $ports (dict "name" "nginx-https" "targetPort" 443 "port" 443 "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 }} diff --git a/charts/nextcloud/1.6.19/templates/serviceaccount.yaml b/charts/nextcloud/1.6.19/templates/serviceaccount.yaml new file mode 100644 index 0000000000..48213465b0 --- /dev/null +++ b/charts/nextcloud/1.6.19/templates/serviceaccount.yaml @@ -0,0 +1,35 @@ +{{ include "common.serviceaccount" . | nindent 0 }} + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: "{{ .Release.Name }}-service-account-role-binding" +subjects: +- kind: ServiceAccount + name: "{{ template "common.names.serviceAccountName" . }}" + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + name: "{{ .Release.Name }}-service-account-role" + apiGroup: rbac.authorization.k8s.io + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: "{{ .Release.Name }}-service-account-role" + namespace: {{ .Release.Namespace }} +rules: + - apiGroups: + - "" + - "apps" + resources: + - pods + - deployments + verbs: + - delete + - get + - list diff --git a/charts/nextcloud/item.yaml b/charts/nextcloud/item.yaml new file mode 100644 index 0000000000..14b174550d --- /dev/null +++ b/charts/nextcloud/item.yaml @@ -0,0 +1,3 @@ +categories: + - productivity +icon_url: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg