2021-03-01 19:42:26 +00:00
# Storage
This article serves as a development extention to the storage article available [here ](https://wiki.truecharts.org/general/storage/ )
##### Storage and Common-Chart
For all these storage solutions we require the commonchart to be added to the App.
2021-04-13 19:43:27 +00:00
The Common-Chart handles both the connection/addition of storage to the container and spinning up special k8s jobs to fix the permissions if requested for the Custom storage.
2021-03-01 19:42:26 +00:00
2021-04-13 19:43:27 +00:00
### Integrated Persistent Storage
2021-03-01 19:42:26 +00:00
When adding an App, there are almost always certain folders that are required for solid Apps performance. For example config files that should be persistent across restarts.
2021-04-13 19:43:27 +00:00
For these storages we can easily add fixes values in the UI, these settings can not be disabled or removed and would, by default and preferably, be limited to the "internal" storage class
2021-03-01 19:42:26 +00:00
Preventing the user to disable them, ensures that users don't (by mistake) remove the storage.
#####
```
2021-04-13 19:43:27 +00:00
- variable: persistence
label: "Integrated Persistent Storage"
description: "Websocket Service"
group: "Storage"
2021-03-01 19:42:26 +00:00
schema:
type: dict
attrs:
2021-04-13 19:43:27 +00:00
- variable: data
label: "App Config Storage"
description: "Stores the Application Configuration."
2021-03-01 19:42:26 +00:00
schema:
type: dict
attrs:
- variable: enabled
2021-04-13 19:43:27 +00:00
label: "Enable the storage"
2021-03-01 19:42:26 +00:00
schema:
type: boolean
default: true
hidden: true
2021-04-13 19:43:27 +00:00
- variable: storageClass
label: "Type of Storage"
description: " Warning: Anything other than Internal will break rollback!"
2021-03-01 19:42:26 +00:00
schema:
2021-04-13 19:43:27 +00:00
type: string
default: ""
enum:
- value: ""
description: "Internal"
- variable: mountPath
label: "mountPath"
description: "Path inside the container the storage is mounted"
schema:
type: string
default: "/data"
hidden: true
2021-03-01 19:42:26 +00:00
- variable: emptyDir
2021-04-13 19:43:27 +00:00
label: "Mount a ramdisk instead of actual storage"
2021-03-01 19:42:26 +00:00
schema:
hidden: true
2021-05-23 16:30:34 +00:00
attrs:
- variable: enabled
label: "Enable emptyDir"
schema:
type: boolean
default: false
hidden: true
2021-04-13 19:43:27 +00:00
- variable: accessMode
label: "Access Mode (Advanced)"
description: "Allow or disallow multiple PVC's writhing to the same PVC"
2021-03-01 19:42:26 +00:00
schema:
type: string
2021-04-13 19:43:27 +00:00
default: "ReadWriteOnce"
enum:
- value: "ReadWriteOnce"
description: "ReadWriteOnce"
- value: "ReadOnlyMany"
description: "ReadOnlyMany"
- value: "ReadWriteMany"
description: "ReadWriteMany"
- variable: size
label: "Size quotum of storage"
2021-03-01 19:42:26 +00:00
schema:
2021-04-13 19:43:27 +00:00
type: string
default: "100Gi"
2021-03-01 19:42:26 +00:00
```
### Unlimited Custom Storage Mounts
We support presenting the user with a "Do it yourself" style list, in which the user can add unlimited paths on the host system to mount.
It should always be included in any App, to give users the option to customise things however they like.
##### Example
```
2021-05-23 16:30:34 +00:00
- variable: hostPathMounts
2021-03-01 19:42:26 +00:00
label: "Custom app storage"
2021-03-06 20:32:31 +00:00
group: "Storage and Devices"
2021-03-01 19:42:26 +00:00
schema:
type: list
default: []
items:
- variable: volumeMount
label: "Custom Storage"
schema:
type: dict
attrs:
- variable: enabled
label: "Enabled"
schema:
type: boolean
default: true
required: true
hidden: true
editable: false
- variable: setPermissions
label: "Automatic Permissions"
description: "Automatically set permissions on install"
schema:
type: boolean
default: true
hidden: false
- variable: name
label: "Mountpoint Name"
schema:
type: string
default: ""
required: true
editable: true
- variable: emptyDir
2021-05-23 16:30:34 +00:00
label: "Mount a ramdisk instead of actual storage"
2021-03-01 19:42:26 +00:00
schema:
hidden: true
2021-05-23 16:30:34 +00:00
attrs:
- variable: enabled
label: Enable emptyDir
schema:
type: boolean
default: false
hidden: true
2021-03-01 19:42:26 +00:00
- variable: mountPath
label: "Mount Path"
description: "Path to mount inside the pod"
schema:
type: path
required: true
default: ""
editable: true
- variable: hostPathEnabled
label: "host Path Enabled"
schema:
type: boolean
default: true
hidden: true
- variable: hostPath
label: "Host Path"
schema:
type: hostpath
required: true
```