diff --git a/charts/stable/nextcloud/Chart.yaml b/charts/stable/nextcloud/Chart.yaml index 45b6a1000c4..d7f916f0e1a 100644 --- a/charts/stable/nextcloud/Chart.yaml +++ b/charts/stable/nextcloud/Chart.yaml @@ -37,7 +37,7 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm type: application -version: 15.2.45 +version: 15.2.46 annotations: truecharts.org/catagories: | - cloud diff --git a/charts/stable/nextcloud/docs/validation.md b/charts/stable/nextcloud/docs/validation.md new file mode 100644 index 00000000000..bda44241763 --- /dev/null +++ b/charts/stable/nextcloud/docs/validation.md @@ -0,0 +1,13 @@ +# Input Validation + +**`Default Phone Region`** +Accepted formats are: + +- 2x Capital Letters (eg. `US`) + +Regex used to match this: `^[A-Z]{2}$` +You can try live [here](https://regex101.com/r/qf1Lti/1) + +--- + +_If you find a field that you think it needs validation, please open an issue on github_ diff --git a/charts/stable/nextcloud/questions.yaml b/charts/stable/nextcloud/questions.yaml index 2653c464127..bd10206e054 100644 --- a/charts/stable/nextcloud/questions.yaml +++ b/charts/stable/nextcloud/questions.yaml @@ -67,6 +67,20 @@ questions: required: true $ref: - "definitions/nodeIP" + - variable: nextcloud + group: "Container Configuration" + label: "Nextcloud Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: default_phone_region + label: "Default Phone Region" + description: "Sets the default phone region in ISO_3166-1 format (e.g. US). https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements" + schema: + type: string + valid_chars: '^[A-Z]{2}$' + default: "" - variable: imaginary group: "Container Configuration" label: "Preview Generation Configuration" diff --git a/charts/stable/nextcloud/templates/_hpb.tpl b/charts/stable/nextcloud/templates/_hpb.tpl index 4adac4a5e67..e22c0f709dd 100644 --- a/charts/stable/nextcloud/templates/_hpb.tpl +++ b/charts/stable/nextcloud/templates/_hpb.tpl @@ -117,6 +117,11 @@ command: {{- end }} php /var/www/html/occ config:system:set overwrite.cli.url --value='{{ $url }}' + # Set default phone region + {{- with .Values.nextcloud.default_phone_region | upper }} + php /var/www/html/occ config:system:set default_phone_region --value='{{ . }}' + {{- end }} + until $(curl --output /dev/null --silent --head --fail -H "Host: test.fakedomain.dns" http://127.0.0.1:7867/push/test/cookie); do echo "High Performance Backend not running ... waiting..." sleep 10 diff --git a/charts/stable/nextcloud/values.yaml b/charts/stable/nextcloud/values.yaml index 42b8696c328..fa056cf4db8 100644 --- a/charts/stable/nextcloud/values.yaml +++ b/charts/stable/nextcloud/values.yaml @@ -397,6 +397,10 @@ cronjob: hpb: enabled: true +nextcloud: + # https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + default_phone_region: "" + imaginary: enabled: true preview_max_x: 2048