diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index e2c42ffb..496df1be 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 6.0.3 +version: 6.1.0 appVersion: 30.0.0 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index 38c4fb1d..62e033ef 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -161,6 +161,7 @@ The following table lists the configurable parameters of the nextcloud chart and | `nginx.image.pullPolicy` | nginx Image pull policy | `IfNotPresent` | | `nginx.image.pullPolicy` | nginx Image pull policy | `IfNotPresent` | | `nginx.containerPort` | Customize container port e.g. when not running as root | `IfNotPresent` | +| `nginx.ipFamilies` | Customize container to listen on IPv4, IPv6 or both | `["IPv4"]` | | `nginx.config.default` | Whether to use nextcloud's recommended nginx config | `true` | | `nginx.config.custom` | Specify a custom config for nginx | `{}` | | `nginx.resources` | nginx resources | `{}` | diff --git a/charts/nextcloud/files/nginx.config.tpl b/charts/nextcloud/files/nginx.config.tpl index 8d98440a..59d68f35 100644 --- a/charts/nextcloud/files/nginx.config.tpl +++ b/charts/nextcloud/files/nginx.config.tpl @@ -3,7 +3,16 @@ upstream php-handler { } server { + {{- if and (has "IPv4" .Values.nginx.ipFamilies) (has "IPv6" .Values.nginx.ipFamilies) }} + # Both IPv4 and IPv6 are enabled + listen [::]:{{ .Values.nginx.containerPort }} ipv6only=off; + {{- else if and (not (has "IPv4" .Values.nginx.ipFamilies)) (has "IPv6" .Values.nginx.ipFamilies) }} + # Only IPv6 is enabled + listen [::]:{{ .Values.nginx.containerPort }}; + {{- else }} + # Default, IPv4 only listen {{ .Values.nginx.containerPort }}; + {{- end }} # HSTS settings # WARNING: Only add the preload option once you read about @@ -48,7 +57,7 @@ server { include mime.types; types { text/javascript js mjs; - } + } # Path to the root of your installation root /var/www/html; diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 5f372828..7acc2ff1 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -324,7 +324,10 @@ nginx: pullPolicy: IfNotPresent containerPort: 80 - + # This configures nginx to listen on either IPv4, IPv6 or both + ipFamilies: + - IPv4 + # - IPv6 config: # This generates the default nginx config as per the nextcloud documentation default: true