nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
334 stars 269 forks source link

Nginx container will not listen on IPv6 #636

Closed mdallaire closed 1 month ago

mdallaire commented 2 months ago

Describe your Issue

I am trying to run the chart on a cluster with IPv6 enabled, but the nextcloud pod never completes because of failed startup probe for the nextcloud-nginx container.

The generated default configuration when nginx is enabled only sets the port to 80 which defaults nginx to listen only on IPv4

Logs and Errors

Startup probe failed: Get "http://[2606:re:dac:ted::1:1697]:80/status.php": dial tcp [2606:re:dac:ted::1:1697]:80: connect: connection refused

Describe your Environment

# paste your values.yaml (anonymize any sensitive data)

Additional context, if any

I just recently switched my cluster from IPv4 to dual-stack. I have had the same issue with other deployment and usually changing the listen address to [::]:80 when using nginx resolves the issue.

Unfortunately, the way the chart generates the default configuration overrides the /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh of the nginx:alpine container.

I might submit a PR to the chart to try and fix this by adding a new value, something like nginx.listenAddress that could be used in charts/nextcloud/files/nginx.config.tpl with the containerPort value.

jessebot commented 2 months ago

Ohhh, @mdallaire, that might be a good idea!

@wrenix, you were just working on cleaning up some more nginx stuff in https://github.com/nextcloud/helm/pull/630, so you've had a recent look at the state of things. This sounds like a good idea right? I personally haven't touched ipv6 with nextcloud yet, but this is all fascinating to me regardless :)

wrenix commented 1 month ago

@jessebot my PR is not involved in that part of Codes. @mdallaire thanks for creating that PR