Skip to content

Commit 9d79183

Browse files
committed
Add client_push configuration #109
Signed-off-by: Andre Köpke <[email protected]>
1 parent 7a9687f commit 9d79183

File tree

3 files changed

+49
-13
lines changed

3 files changed

+49
-13
lines changed

charts/nextcloud/templates/deployment.yaml

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ spec:
8585
livenessProbe:
8686
httpGet:
8787
path: /status.php
88-
port: {{ $.Values.nextcloud.containerPort }}
88+
port: {{ $.Values.nextcloud.containerPort }}
8989
httpHeaders:
90-
- name: Host
91-
value: {{ $.Values.nextcloud.host | quote }}
90+
- name: Host
91+
value: {{ $.Values.nextcloud.host | quote }}
9292
initialDelaySeconds: {{ .initialDelaySeconds }}
9393
periodSeconds: {{ .periodSeconds }}
9494
timeoutSeconds: {{ .timeoutSeconds }}
@@ -101,10 +101,10 @@ spec:
101101
readinessProbe:
102102
httpGet:
103103
path: /status.php
104-
port: {{ $.Values.nextcloud.containerPort }}
104+
port: {{ $.Values.nextcloud.containerPort }}
105105
httpHeaders:
106-
- name: Host
107-
value: {{ $.Values.nextcloud.host | quote }}
106+
- name: Host
107+
value: {{ $.Values.nextcloud.host | quote }}
108108
initialDelaySeconds: {{ .initialDelaySeconds }}
109109
periodSeconds: {{ .periodSeconds }}
110110
timeoutSeconds: {{ .timeoutSeconds }}
@@ -117,10 +117,10 @@ spec:
117117
startupProbe:
118118
httpGet:
119119
path: /status.php
120-
port: {{ $.Values.nextcloud.containerPort }}
120+
port: {{ $.Values.nextcloud.containerPort }}
121121
httpHeaders:
122-
- name: Host
123-
value: {{ $.Values.nextcloud.host | quote }}
122+
- name: Host
123+
value: {{ $.Values.nextcloud.host | quote }}
124124
initialDelaySeconds: {{ .initialDelaySeconds }}
125125
periodSeconds: {{ .periodSeconds }}
126126
timeoutSeconds: {{ .timeoutSeconds }}
@@ -158,7 +158,7 @@ spec:
158158
livenessProbe:
159159
httpGet:
160160
path: /status.php
161-
port: {{ $.Values.nextcloud.containerPort }}
161+
port: {{ $.Values.nextcloud.containerPort }}
162162
httpHeaders:
163163
- name: Host
164164
value: {{ $.Values.nextcloud.host | quote }}
@@ -174,7 +174,7 @@ spec:
174174
readinessProbe:
175175
httpGet:
176176
path: /status.php
177-
port: {{ $.Values.nextcloud.containerPort }}
177+
port: {{ $.Values.nextcloud.containerPort }}
178178
httpHeaders:
179179
- name: Host
180180
value: {{ $.Values.nextcloud.host | quote }}
@@ -190,7 +190,7 @@ spec:
190190
startupProbe:
191191
httpGet:
192192
path: /status.php
193-
port: {{ $.Values.nextcloud.containerPort }}
193+
port: {{ $.Values.nextcloud.containerPort }}
194194
httpHeaders:
195195
- name: Host
196196
value: {{ $.Values.nextcloud.host | quote }}
@@ -274,6 +274,25 @@ spec:
274274
volumeMounts:
275275
{{- include "nextcloud.volumeMounts" . | trim | nindent 12 }}
276276
{{- end }}{{/* end-if cronjob.enabled */}}
277+
{{ if .Values.clientPush.enabled }}
278+
- name: {{ .Chart.Name }}-client-push
279+
image: {{ include "nextcloud.image" . }}
280+
imagePullPolicy: {{ .Values.image.pullPolicy }}
281+
command:
282+
- custom_apps/notify_push/bin/x86_64/notify_push
283+
args:
284+
- config/config.php
285+
env:
286+
- name: NEXTCLOUD_URL
287+
value: http://localhost:80
288+
volumeMounts:
289+
- name: nextcloud-main
290+
mountPath: /var/www/html/custom_apps
291+
subPath: {{ ternary "custom_apps" (printf "%s/custom_apps" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
292+
- name: nextcloud-main
293+
mountPath: /var/www/html/config
294+
subPath: {{ ternary "config" (printf "%s/config" .Values.nextcloud.persistence.subPath) (empty .Values.nextcloud.persistence.subPath) }}
295+
{{- end }}{{/* end-if clientPush.enabled */}}
277296
{{- with .Values.nextcloud.extraSidecarContainers }}
278297
{{- toYaml . | nindent 8 }}
279298
{{- end }}
@@ -335,7 +354,7 @@ spec:
335354
persistentVolumeClaim:
336355
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "nextcloud.fullname" . }}-nextcloud{{- end }}
337356
{{- else }}
338-
emptyDir: {}
357+
emptyDir: { }
339358
{{- end }}
340359
{{- if and .Values.persistence.nextcloudData.enabled .Values.persistence.enabled }}
341360
- name: nextcloud-data

charts/nextcloud/templates/nginx-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@
139139
location / {
140140
try_files $uri $uri/ /index.php$request_uri;
141141
}
142+
143+
144+
{{ if .Values.clientPush.enabled }}
145+
# client-push application
146+
# https://github.com/nextcloud/notify_push?tab=readme-ov-file#nginx
147+
location ^~ /push/ {
148+
proxy_pass http://127.0.0.1:7867/;
149+
proxy_http_version 1.1;
150+
proxy_set_header Upgrade $http_upgrade;
151+
proxy_set_header Connection "Upgrade";
152+
proxy_set_header Host $host;
153+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
154+
}
155+
{{ end }}{{/* end-if clientPush.enabled */}}
142156
}
143157
{{- end }}
144158

charts/nextcloud/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,9 @@ rbac:
558558
name: nextcloud-serviceaccount
559559
annotations: {}
560560

561+
clientPush:
562+
enabled: true
563+
561564

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

0 commit comments

Comments
 (0)