diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index be3aeea9..8861bf9e 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -85,10 +85,10 @@ spec: livenessProbe: httpGet: path: /status.php - port: {{ $.Values.nextcloud.containerPort }} + port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - - name: Host - value: {{ $.Values.nextcloud.host | quote }} + - name: Host + value: {{ $.Values.nextcloud.host | quote }} initialDelaySeconds: {{ .initialDelaySeconds }} periodSeconds: {{ .periodSeconds }} timeoutSeconds: {{ .timeoutSeconds }} @@ -101,10 +101,10 @@ spec: readinessProbe: httpGet: path: /status.php - port: {{ $.Values.nextcloud.containerPort }} + port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - - name: Host - value: {{ $.Values.nextcloud.host | quote }} + - name: Host + value: {{ $.Values.nextcloud.host | quote }} initialDelaySeconds: {{ .initialDelaySeconds }} periodSeconds: {{ .periodSeconds }} timeoutSeconds: {{ .timeoutSeconds }} @@ -117,10 +117,10 @@ spec: startupProbe: httpGet: path: /status.php - port: {{ $.Values.nextcloud.containerPort }} + port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - - name: Host - value: {{ $.Values.nextcloud.host | quote }} + - name: Host + value: {{ $.Values.nextcloud.host | quote }} initialDelaySeconds: {{ .initialDelaySeconds }} periodSeconds: {{ .periodSeconds }} timeoutSeconds: {{ .timeoutSeconds }} @@ -158,7 +158,7 @@ spec: livenessProbe: httpGet: path: /status.php - port: {{ $.Values.nextcloud.containerPort }} + port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - name: Host value: {{ $.Values.nextcloud.host | quote }} @@ -174,7 +174,7 @@ spec: readinessProbe: httpGet: path: /status.php - port: {{ $.Values.nextcloud.containerPort }} + port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - name: Host value: {{ $.Values.nextcloud.host | quote }} @@ -190,7 +190,7 @@ spec: startupProbe: httpGet: path: /status.php - port: {{ $.Values.nextcloud.containerPort }} + port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - name: Host value: {{ $.Values.nextcloud.host | quote }} @@ -274,6 +274,25 @@ spec: volumeMounts: {{- include "nextcloud.volumeMounts" . | trim | nindent 12 }} {{- end }}{{/* end-if cronjob.enabled */}} + {{ if .Values.clientPush.enabled }} + - name: {{ .Chart.Name }}-client-push + image: {{ include "nextcloud.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - custom_apps/notify_push/bin/x86_64/notify_push + args: + - config/config.php + env: + - name: NEXTCLOUD_URL + value: http://localhost:80 + volumeMounts: + - name: nextcloud-main + mountPath: /var/www/html/custom_apps + subPath: {{ ternary "custom_apps" (printf "%s/custom_apps" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }} + - name: nextcloud-main + mountPath: /var/www/html/config + subPath: {{ ternary "config" (printf "%s/config" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }} + {{- end }}{{/* end-if clientPush.enabled */}} {{- with .Values.nextcloud.extraSidecarContainers }} {{- toYaml . | nindent 8 }} {{- end }} @@ -335,7 +354,7 @@ spec: persistentVolumeClaim: claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud{{- end }} {{- else }} - emptyDir: {} + emptyDir: { } {{- end }} {{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }} - name: nextcloud-data diff --git a/charts/nextcloud/templates/nginx-config.yaml b/charts/nextcloud/templates/nginx-config.yaml index 7c0df78d..cb4cd0f0 100644 --- a/charts/nextcloud/templates/nginx-config.yaml +++ b/charts/nextcloud/templates/nginx-config.yaml @@ -139,6 +139,20 @@ location / { try_files $uri $uri/ /index.php$request_uri; } + + + {{ if .Values.clientPush.enabled }} + # client-push application + # https://github.com/nextcloud/notify_push?tab=readme-ov-file#nginx + location ^~ /push/ { + proxy_pass http://127.0.0.1:7867/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + {{ end }}{{/* end-if clientPush.enabled */}} } {{- end }} diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 8a0868dd..d4c4fbef 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -558,6 +558,9 @@ rbac: name: nextcloud-serviceaccount annotations: {} +clientPush: + enabled: true + ## @param securityContext for nextcloud pod @deprecated Use `nextcloud.podSecurityContext` instead securityContext: {}