Skip to content

Commit 796267e

Browse files
Merge remote-tracking branch 'origin/main' into allow-nginx-additional-config
2 parents 5c1a77b + 12ea561 commit 796267e

6 files changed

Lines changed: 180 additions & 127 deletions

File tree

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 4.2.2
3+
version: 4.3.1
44
appVersion: 27.0.2
55
description: A file sharing server that puts the control and security of your own data back into your hands.
66
keywords:

charts/nextcloud/README.md

Lines changed: 116 additions & 112 deletions
Large diffs are not rendered by default.

charts/nextcloud/templates/nginx-config.yaml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
{{- if .Values.nginx.enabled -}}
2-
apiVersion: v1
3-
kind: ConfigMap
4-
metadata:
5-
name: {{ template "nextcloud.fullname" . }}-nginxconfig
6-
labels:
7-
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
8-
helm.sh/chart: {{ include "nextcloud.chart" . }}
9-
app.kubernetes.io/instance: {{ .Release.Name }}
10-
app.kubernetes.io/managed-by: {{ .Release.Service }}
11-
data:
12-
{{- if .Values.nginx.config.default }}
13-
default.conf: |-
1+
{{- define "default.conf" }}
142
upstream php-handler {
153
server 127.0.0.1:9000;
164
}
175

186
server {
19-
listen 80;
7+
listen {{ .Values.nginx.containerPort | default "80" }};
208

219
# HSTS settings
2210
# WARNING: Only add the preload option once you read about
@@ -144,6 +132,22 @@ data:
144132
}
145133
}
146134
{{- end }}
135+
136+
{{- if .Values.nginx.enabled -}}
137+
apiVersion: v1
138+
kind: ConfigMap
139+
metadata:
140+
name: {{ template "nextcloud.fullname" . }}-nginxconfig
141+
labels:
142+
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
143+
helm.sh/chart: {{ include "nextcloud.chart" . }}
144+
app.kubernetes.io/instance: {{ .Release.Name }}
145+
app.kubernetes.io/managed-by: {{ .Release.Service }}
146+
data:
147+
{{- if .Values.nginx.config.default }}
148+
default.conf: |-
149+
{{- template "default.conf" $ }}
150+
{{- end }}
147151
{{- if .Values.nginx.config.custom }}
148152
zz-custom.conf: |-
149153
{{ .Values.nginx.config.custom | indent 4 }}

charts/nextcloud/templates/service.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ spec:
1313
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
1414
loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }}
1515
{{- end }}
16+
{{- if .Values.service.ipFamilies }}
17+
ipFamilies:
18+
{{- toYaml .Values.service.ipFamilies | nindent 4 }}
19+
{{- end }}
20+
{{- if .Values.service.ipFamilyPolicy }}
21+
ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
22+
{{- end }}
1623
ports:
1724
- port: {{ .Values.service.port }}
1825
targetPort: {{ .Values.nextcloud.containerPort }}

charts/nextcloud/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ nginx:
214214
repository: nginx
215215
tag: alpine
216216
pullPolicy: IfNotPresent
217+
containerPort: 80
217218

218219
config:
219220
# This generates the default nginx config as per the nextcloud documentation

values.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
image:
2+
tag: 24.0.3-fpm-alpine
3+
nextcloud:
4+
extraSidecarContainers:
5+
- name: nginx-exporter
6+
image: nginx/nginx-prometheus-exporter
7+
command:
8+
- nginx-prometheus-exporter
9+
- -nginx.scrape-uri=http://127.0.0.1/stub_status
10+
ports:
11+
- name: metrics
12+
containerPort: 9113
13+
livenessProbe:
14+
httpGet:
15+
path: /metrics
16+
port: metrics
17+
readinessProbe:
18+
httpGet:
19+
path: /metrics
20+
port: metrics
21+
nginx:
22+
config:
23+
custom: |-
24+
server {
25+
listen localhost;
26+
server_name status.localhost;
27+
keepalive_timeout 0;
28+
29+
access_log off;
30+
31+
location /stub_status {
32+
stub_status;
33+
allow 127.0.0.1;
34+
deny all;
35+
}
36+
}
37+
enabled: true

0 commit comments

Comments
 (0)