Move to new ix_values system (#233)

* Refactor questions.yaml, ix_values.yaml and values.yaml

* Add Docs
This commit is contained in:
Kjeld Schouten-Lebbing
2021-03-06 21:32:31 +01:00
committed by kjeld Schouten-Lebbing
parent 5373c61f2d
commit 680e359d99
153 changed files with 4616 additions and 4296 deletions
+25
View File
@@ -94,6 +94,31 @@ To minimise the maintenance load of our App collection, we always aim to standar
Be aware that sometimes specific functions might or might not completely function. Leaving them out would, however, everely increase the maintenance load and often said functionality will be added in the common-chart later on anyway.
##### Groups
To make sure all apps stay somewhat the same, we use a standardised `groups:` section. Please make sure to use this in your Apps:
```
groups:
- name: "Container Image"
description: "Image to be used for container"
- name: "Workload Configuration"
description: "Configure workload deployment"
- name: "Configuration"
description: "additional container configuration"
- name: "Networking"
description: "Configure / service for container"
- name: "Storage and Devices"
description: "Persist and share data that is separate from the lifecycle of the container"
- name: "Resource Reservation"
description: "Specify resources to be allocated to workload"
- name: "Reverse Proxy Configuration"
description: "Reverse Proxy configuration"
- name: "WARNING"
description: "WARNING"
```
##### General Configuration options
These options are always included because almost every chart (eventually) has a use for them and/or other parts of the common chart depend on them.
+15
View File
@@ -4,6 +4,21 @@ Every App needs to be exposed to something, either an UI, API or other container
### Two kinds of services
##### First: hostNetwork
Always add the hostNetwork option above the "services" section.
This is to try and keep things clear for the user.
```
# Enable Host Networking
- variable: hostNetwork
group: "Networking"
label: "Enable Host Networking"
schema:
type: boolean
default: false
```
##### Main Service
Every App is required to have a main service, the primary thing that users (or other Apps!) connect with. No mater if it's a webUI, an API, a database connection or something totally else, A service is always required.
+2 -2
View File
@@ -19,7 +19,7 @@ Preventing the user to disable them, ensures that users don't (by mistake) remov
```
- variable: appVolumeMounts
label: "app storage"
group: "Storage"
group: "Storage and Devices"
schema:
type: dict
attrs:
@@ -92,7 +92,7 @@ It should always be included in any App, to give users the option to customise t
```
- variable: additionalAppVolumeMounts
label: "Custom app storage"
group: "Storage"
group: "Storage and Devices"
schema:
type: list
default: []
+27
View File
@@ -0,0 +1,27 @@
# Values.yaml Files
Values.yaml files generally always contain configuration setting for Helm charts, TrueCharts is no different.
However, we have multiple different values.yaml files, with different goals. Because TrueNAS SCALE just works slightly differently from standard Helm Charts
### The Files
##### values.yaml
The normal file with default setting in helm charts. However, for our non-library and non-dependency charts, this is not used for TrueCharts. As questions.yaml generates configs on demand (with addition of ix_values.yaml), this file might interfere with some Helm operations combined with the questions.yaml or test_values.yaml systems or cause unexpected behavior if used.
##### ix_values.yaml
This file contains config values that are not included in questions.yaml, but should be copied into the resulting configuration anyway. It's mostly used to ensure setting can be changed by the maintainer with every update, such as versions, which is not possible when setting things as defaults inside questions.yaml
This file is, however, not very well checked by validation and CI. Use it when you absolutely have to.
##### test_values.yaml
Our Apps often use special features of TrueNAS inside questions.yaml and our charts. However these features are not (always) compatible with stock Helm. Therefore we define a set of seperate "test" values.yaml setting that get used when we run the test CI.
They should, however, be as close as possible to your "actual" default settings in questions.yaml
##### default_values.yaml
This on is the "odd one" of the bunch. We prefer not to use it for actual default, but to store default when porting charts from upstream.