Skip to content

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

Draft
somaz94 wants to merge 1 commit into
nextcloud:mainfrom
somaz94:feat/httproute-well-known-redirects
Draft

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

Conversation

@somaz94

@somaz94 somaz94 commented Jul 2, 2026

Copy link
Copy Markdown

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

Signed-off-by: somaz <genius5711@gmail.com>
somaz94 added a commit to somaz94/somaz94 that referenced this pull request Jul 2, 2026
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

1 participant