Skip to content
Draft
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
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 9.2.0
version: 9.3.0
# renovate: image=docker.io/library/nextcloud
appVersion: 34.0.1
description: A file sharing server that puts the control and security of your own data back into your hands.
Expand Down
3 changes: 3 additions & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,9 @@ ingress:
deny all;
}
```

When exposing Nextcloud through the Gateway API (`httpRoute.enabled: true`), the CalDAV and CardDAV redirects are added automatically as `RequestRedirect` rules (`httpRoute.wellKnown.enabled`, on by default), so no implementation-specific configuration is required. Set `httpRoute.wellKnown.enabled: false` to opt out.

## Preserving Source IP

- Make sure your loadbalancer preserves source IP, for bare metal, `metalb` does and `klipper-lb` doesn't.
Expand Down
26 changes: 25 additions & 1 deletion charts/nextcloud/templates/route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,35 @@ spec:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
rules:
{{- if .Values.httpRoute.wellKnown.enabled }}
{{- range $path := list "/.well-known/carddav" "/.well-known/caldav" }}
- matches:
- path:
type: Exact
value: {{ $path }}
filters:
- type: RequestRedirect
requestRedirect:
path:
type: ReplaceFullPath
replaceFullPath: /remote.php/dav
statusCode: 301
{{- end }}
{{- end }}
{{- range .Values.httpRoute.rules }}
- backendRefs:
{{- $isRedirect := false }}
{{- range .filters }}
{{- if eq (.type | default "") "RequestRedirect" }}
{{- $isRedirect = true }}
{{- end }}
{{- end }}
-
{{- if not $isRedirect }}
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
weight: 1
{{- end }}
{{- with .matches }}
matches:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ httpRoute:
hostnames: []
# -- Reference to parent gateways
parentRefs: []
# -- Add the standard Nextcloud service discovery redirects
# (`/.well-known/carddav` and `/.well-known/caldav` -> `/remote.php/dav`) as
# Gateway API `RequestRedirect` rules. Unlike the ingress-nginx server snippet
# this needs no implementation-specific config. Set to false to opt out.
wellKnown:
enabled: true
# -- List of rules and filters applied.
rules:
- matches:
Expand Down