nextcloud: add additional env section (#2433)

This commit is contained in:
Stavros Kois
2024-05-03 12:18:16 +03:00
committed by GitHub
parent b9639e2e21
commit d7e616352e
4 changed files with 34 additions and 11 deletions

View File

@@ -171,7 +171,7 @@ questions:
description: The port for the Nextcloud Web UI.
schema:
type: int
default: 20810
default: 9001
min: 9000
max: 65535
required: true

View File

@@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow
annotations:
title: Nextcloud
type: application
version: 2.0.0
version: 2.0.1
apiVersion: v2
appVersion: 29.0.0
kubeVersion: '>=1.16.0-0'

View File

@@ -25,8 +25,6 @@ def migrate_common_lib(values):
]
values.update({
'shouldShowStorageToggle': True,
'isDataInTheSameVolume': True,
# Migrate Network
'ncNetwork': {
'webPort': values['service']['nodePort'],
@@ -72,6 +70,8 @@ def migrate_common_lib(values):
},
# Migrate Storage
'ncStorage': {
'shouldShowStorageToggle': True,
'isDataInTheSameVolume': True,
'pgData': migrate_volume(values['postgresAppVolumeMounts']['postgres-data']),
'pgBackup': migrate_volume(values['postgresAppVolumeMounts']['postgres-backup']),
'data': migrate_volume(values['appVolumeMounts']['nextcloud-data']),
@@ -93,6 +93,11 @@ def migrate_common_lib(values):
return values
def migrate(values):
if 'isDataInTheSameVolume' in values.keys():
values['ncStorage']['isDataInTheSameVolume'] = values.pop('isDataInTheSameVolume', True)
values['ncStorage']['shouldShowStorageToggle'] = values.pop('shouldShowStorageToggle', True)
return values
# If this missing, we have already migrated
if not 'appVolumeMounts' in values.keys():
return values

View File

@@ -40,6 +40,7 @@ questions:
schema:
type: string
default: ""
private: true
required: true
- variable: host
label: Host
@@ -127,6 +128,28 @@ questions:
show_if: [["enabled", "=", true]]
default: "*/15 * * * *"
required: true
- variable: additionalEnvs
label: Additional Environment Variables
description: Configure additional environment variables for Nextcloud.
schema:
type: list
default: []
items:
- variable: env
label: Environment Variable
schema:
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true
- variable: podOptions
label: ""
@@ -258,7 +281,6 @@ questions:
schema:
type: string
required: true
immutable: true
default: ixVolume
enum:
- value: hostPath
@@ -336,7 +358,6 @@ questions:
schema:
type: string
required: true
immutable: true
default: ixVolume
enum:
- value: hostPath
@@ -366,7 +387,7 @@ questions:
required: true
immutable: true
hidden: true
default: "html"
default: "data"
- variable: aclEntries
label: ACL Configuration
schema:
@@ -415,7 +436,6 @@ questions:
schema:
type: string
required: true
immutable: true
default: ixVolume
enum:
- value: hostPath
@@ -501,7 +521,6 @@ questions:
schema:
type: string
required: true
immutable: true
default: ixVolume
enum:
- value: hostPath
@@ -596,7 +615,6 @@ questions:
type: string
required: true
default: "ixVolume"
immutable: true
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
@@ -749,7 +767,7 @@ questions:
schema:
type: string
max_length: 12
valid_chars: "^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$"
valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$'
valid_chars_error: |
Valid Memory limit formats are</br>
- Suffixed with E/P/T/G/M/K - eg. 1G</br>