Skip to content

feat(nextcloud): add CalDAV/CardDAV redirects to HTTPRoute#866

Merged
varet80 merged 1 commit into
nextcloud:mainfrom
somaz94:feat/httproute-well-known-redirects
Jul 15, 2026
Merged

feat(nextcloud): add CalDAV/CardDAV redirects to HTTPRoute#866
varet80 merged 1 commit into
nextcloud:mainfrom
somaz94:feat/httproute-well-known-redirects

Conversation

@somaz94

@somaz94 somaz94 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description of the change

The chart's HTTPRoute template (route.yaml) always added backendRefs to every rule, which made it impossible to define a rule using a RequestRedirect filter (Gateway API rejects RequestRedirect combined with backendRefs). This PR:

  • Only renders backendRefs for rules that do not use a RequestRedirect filter, so redirect rules can now be defined.
  • Adds the standard Nextcloud service discovery redirects (/.well-known/carddav and /.well-known/caldav -> /remote.php/dav) as RequestRedirect rules, gated behind httpRoute.wellKnown.enabled (on by default). With Gateway API these need no implementation-specific config.

Benefits

CalDAV/CardDAV service discovery works out of the box for Gateway API users, matching the ingress-nginx server-snippet behaviour already documented in the README.

Possible drawbacks

httpRoute.wellKnown.enabled defaults to true, so users who already enable httpRoute get the two redirect rules added on upgrade. Set httpRoute.wellKnown.enabled: false to opt out.

Applicable issues

Additional information

Validated locally with helm lint and helm template for: default (redirects + catch-all), wellKnown.enabled=false, and a user-supplied RequestRedirect rule (confirmed no backendRefs is rendered).

Checklist

  • I have read the CONTRIBUTING.md doc.
  • DCO has been signed off on the commit.
  • Chart version bumped in Chart.yaml according to semver.
  • (optional) Parameters are documented in the README.md

somaz94 added a commit to somaz94/somaz94 that referenced this pull request Jul 2, 2026
@somaz94 somaz94 force-pushed the feat/httproute-well-known-redirects branch from ffcf67b to a28f6cc Compare July 13, 2026 01:56
@varet80 varet80 requested a review from wrenix July 13, 2026 03:54
@varet80

varet80 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

@somaz94 how come this is still draft?
are there more improvements coming in?

@somaz94

somaz94 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@varet80 No more changes coming — it was in draft only while I validated the CI matrix locally and on CI. Everything's green now, so I've marked it ready for review. Thanks for the ping!

@somaz94 somaz94 marked this pull request as ready for review July 13, 2026 05:05
@varet80

varet80 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

@somaz94 can you bump patch version of helm?

@varet80 varet80 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please bump helmchart version

Signed-off-by: somaz <genius5711@gmail.com>
@somaz94 somaz94 force-pushed the feat/httproute-well-known-redirects branch from a28f6cc to 0a4f480 Compare July 15, 2026 01:48
@somaz94

somaz94 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Bumped the chart patch version to 9.2.2 and rebased on main (also integrated the explicit group/kind on backendRefs from the recent Argo CD drift fix). Thanks for the review!

@varet80 varet80 merged commit 5607c0d into nextcloud:main Jul 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: HTTPRoute Add caldav and webdav redirect rules

2 participants