Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 32 additions & 13 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,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 }}
Expand All @@ -103,10 +103,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 }}
Expand All @@ -119,10 +119,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 }}
Expand Down Expand Up @@ -164,7 +164,7 @@ spec:
livenessProbe:
httpGet:
path: /status.php
port: {{ $.Values.nextcloud.containerPort }}
port: {{ $.Values.nextcloud.containerPort }}
httpHeaders:
- name: Host
value: {{ $.Values.nextcloud.host | quote }}
Expand All @@ -180,7 +180,7 @@ spec:
readinessProbe:
httpGet:
path: /status.php
port: {{ $.Values.nextcloud.containerPort }}
port: {{ $.Values.nextcloud.containerPort }}
httpHeaders:
- name: Host
value: {{ $.Values.nextcloud.host | quote }}
Expand All @@ -196,7 +196,7 @@ spec:
startupProbe:
httpGet:
path: /status.php
port: {{ $.Values.nextcloud.containerPort }}
port: {{ $.Values.nextcloud.containerPort }}
httpHeaders:
- name: Host
value: {{ $.Values.nextcloud.host | quote }}
Expand Down Expand Up @@ -280,6 +280,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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded x86_64

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 }}
Expand Down Expand Up @@ -349,7 +368,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
Expand Down
14 changes: 14 additions & 0 deletions charts/nextcloud/templates/nginx-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
3 changes: 3 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ rbac:
name: nextcloud-serviceaccount
annotations: {}

clientPush:
enabled: true


## @param securityContext for nextcloud pod @deprecated Use `nextcloud.podSecurityContext` instead
securityContext: {}