• Stars
    star
    302
  • Rank 138,030 (Top 3 %)
  • Language Smarty
  • License
    BSD 3-Clause "New...
  • Created about 4 years ago
  • Updated 28 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TrueNAS SCALE Apps Catalogs & Charts

Join Discord Join Forums File Issue

iX Official Catalog

A curated collection of TrueNAS SCALE enhanced Helm charts.

TrueNAS SCALE Chart Structure

A TrueNAS SCALE chart repository differs slightly in directory structure from upstream repos in that it includes an app version directory.

A TrueNAS SCALE chart also has three additional files an app-readme.md file that provides a high level overview display in the TrueNAS SCALE UI and a questions.yaml file defining questions to prompt the user with and an item.yaml file outlining item specific details.

There are 2 directories charts and test, each representing a train. Chart releases created from catalog items in a specific train cannot be moved to another train. Currently only the charts train can be used inside the UI.

charts/ix-chart/<chart version>/
  app-readme.md            # TrueNAS SCALE Specific: Readme file for display in TrueNAS SCALE UI
  charts/                  # Directory containing dependency charts
  Chart.yaml               # Required Helm chart information file
  questions.yaml           # TrueNAS SCALE Specific: File containing questions for TrueNAS SCALE UI
  README.md                # Optional: Helm Readme file (will be rendered in TrueNAS SCALE UI as well)
  templates/               # A directory of templates that, when combined with values.yml will generate K8s YAML
  values.yaml              # The default configuration values for this chart

See the upstream Helm chart developer reference for a complete walk through of developing charts.

To convert an upstream chart to take advantage of TrueNAS SCALE enhanced UX, first create an item.yaml file. This file among other catalog item information provides a list of categories that this chart fits into. This helps users navigate and filtering when browsing the catalog UI.

$ cat charts/ix-chart/item.yaml
categories:
  - generic
icon_url: "http://ix_url"

After that create app-readme.md file.

$ cat charts/ix-chart/<chart version>/app-readme.md

# iX-Chart

iX-chart is a chart designed to let user deploy a docker image in a TrueNAS SCALE kubernetes cluster.
It provides a mechanism to specify workload type, add external host interfaces in the pods, configure volumes and allocate host resources to the workload.

Then add a questions.yaml file to prompt the user for something.

groups:
  - name: "Container Images"
    description: "Image to be used for container"
questions:
  - variable: image
    label: "Docker Image"
    description: "Docker Image Details"
    group: "Container Images"
    schema:
      type: dict
      required: true
      attrs:
        - variable: repository
          description: "Docker image repository"
          label: "Image repository"
          schema:
            type: string
            required: true
        - variable: tag
          description: "Tag to use for specified image"
          label: "Image Tag"
          schema:
            type: string
            default: "latest"
        - variable: pullPolicy
          description: "Docker Image Pull Policy"
          label: "Image Pull Policy"
          schema:
            type: string
            default: "IfNotPresent"
            enum:
              - value: "IfNotPresent"
                description: "Only pull image if not present on host"
              - value: "Always"
                description: "Always pull image even if present on host"
              - value: "Never"
                description: "Never pull image even if it's not present on host"

The above will prompt the user with 2 text fields and a dropdown in the UI getting details for image configuration in a helm chart.

Question Variable Reference

Variable Type Required Description
variable string true define the variable name specified in the values.yamlfile.
label string true define the UI label.
description string false specify the description of the variable.
group string false group questions by input value.
schema dictionary true specify schema details for the variable
schema.type string true specify type of value for variable (current supported types are string, int, boolean, path, hostpath, list, dict, ipaddr, and cron).
schema.required bool false define if the variable is required or not (true \ false), defaults to false
schema.default object false specify the default value.
schema.min_length int false min character length for string type variable.
schema.max_length int false max character length for string type variable.
schema.min int false min integer length.
schema.max int false max integer length.
schema.enum []dictionary false specify the options when the variable type is string, for example,

enum:
- value: "RollingUpdate"
Β Β description: "Create new pods and then kill old ones"
- value: "Recreate"
Β Β description: "Kill existing pods before creating new ones"
schema.valid_chars string false regular expression for input chars validation.
schema.subquestions []subquestion false add an array of subquestions.
schema.show_if string false show current variable if condition specified is true, for example show_if: [["workloadType", "=", "CronJob"]]
schema.show_subquestions_if string false show subquestions if is true or equal to one of the options. for example show_subquestion_if: "static". system will convert this to the filters format specified for shcema.show_if automatically.
schema.attrs []variables false specified when schema.type is dictionary to declare attributes allowed in the dictionary.
schema.items []variables false specified when schema.type is list to declare attributes allowed in the list.
schema.private bool false specified for declaring information sensitive fields.
schema.null bool false specifies if the value for the variable can be null. defaults to false.

subquestions: subquestions[] cannot contain subquestions or show_subquestions_if keys, but all other keys in the above table are supported. Also variables having schema.type list do not support subquestions.

There are some novel cases where we would like to provide ability to configure / manage resources for workloads with getting some data from system dynamically. So a chart can specify certain actions to be performed by the system for a variable by defining a reference. An example better illustrates this concept:

- variable: volume
  label: "Volume"
  schema:
    type: dict
    $ref:
      - "normalize/ixVolume"
    attrs:
      - variable: mountPath
        label: "Mount Path"
        description: "Path where the volume will be mounted inside the pod"
        schema:
          type: path
          required: true
      - variable: datasetName
        label: "Dataset Name"
        schema:
          type: string
          required: true

In the above variable we define a $ref in schema which specifies that the system should take some action for normalizing the value specified for the variable. In this specific case, ix_volume is a concept introduced where we recommend using a volume which we are able to rollback automatically on chart release rollback. In essence, it is just a hostPath volume for which the system automatically creates the dataset specified.

We have following types of actions supported in $ref right now:

  1. definitions
  2. normalize

For (1), system will automatically update schema for a particular definition. For example,

- variable: hostInterface
  description: "Please specify host interface"
  label: "Host Interface"
  schema:
    type: string
    required: true
    $ref:
      - "definitions/interface"

System will automatically populate available interfaces for the user based on what interfaces are available on the system.

For (2), system will normalize values or perform some actions as discussed above.

More Repositories

1

middleware

TrueNAS CORE/Enterprise/SCALE Middleware Git Repository
Python
2,297
star
2

webui

TrueNAS Angular UI
TypeScript
370
star
3

scale-build

TrueNAS SCALE Build System
Python
343
star
4

core-build

TrueNAS CORE/Enterprise Build System
Python
236
star
5

os

FreeBSD base for TrueNAS Core
C
218
star
6

documentation

TrueNAS Documentation Hub
HTML
119
star
7

py-libzfs

Python libzfs bindings
Cython
80
star
8

py-SMART

Wrapper for smartctl (smartmontools)
Python
76
star
9

zettarepl

Zettabyte File System (ZFS) Replication Tool written in Python
Python
67
star
10

apps

Python
49
star
11

truenas-installer

Repo with scripts for TrueNAS installation on Debian
Python
47
star
12

ports

FreeBSD ports tree
Makefile
29
star
13

linux

Linux kernel for TrueNAS SCALE
C
25
star
14

midcli

NAS Command Line Interface
Python
16
star
15

mDNSResponder

C
15
star
16

py-sysctl

Python wrapper for the sysctl system functions
C
13
star
17

samba

C
12
star
18

py-bsd

Python wrappers for various BSD libc and system calls
Cython
9
star
19

freenas-java-api-client

FreeNAS Java API Client: It is a java client library that allows to interact with FreeNAS by Java programatically calls
Java
9
star
20

nfs4xdr-acl-tools

CLI tool to manage Samba-style xdr-formatted NFSv41 ACLs
C
9
star
21

py-netif

Python network configuration library for FreeBSD
Cython
7
star
22

repo-mgmt

Scripts and tools for Apt repository management
Python
5
star
23

chelsiouwire

C
5
star
24

licenselib

License library for FreeNAS
Python
4
star
25

freenas-pkgtools

FreeNAS Packaging/update/installation tools
Python
4
star
26

truecommand-stats

Small utility that TrueCommand uses for gathering system statistics
Go
4
star
27

api_client

Python
3
star
28

python-truenas-requirements

Python
3
star
29

iocage-ix-plugins

Official iXSystems iocage plugins for TrueNAS
3
star
30

api_client_golang

Go
2
star
31

grub2

Shell
2
star
32

containers

Shell
2
star
33

binaries

C
2
star
34

catalog_validation

Validate truenas compliant catalog structure / format.
Python
2
star
35

truenas-cd

Clone of debian-cd with TrueNAS build changes
Shell
2
star
36

nss-pam-ldapd

C
2
star
37

freeipa

FreeIPA, an integrated security information management solution
Shell
1
star
38

apps_validation

TrueNAS Apps Validation Framework
Python
1
star
39

freenas-migrate93

Common repository to share migrations between 9.x and 10.x projects
Python
1
star
40

freenas-migrate113

Python
1
star
41

pyglfs

C
1
star
42

intel-pcm

Shell
1
star
43

py-sg3

Cython
1
star
44

firmware

Repository for firmwares
Python
1
star
45

ixdiagnose

Python
1
star
46

smartmontools

Shell
1
star
47

minio

Python
1
star
48

pkg-qemu

https://salsa.debian.org/qemu-team/qemu
C
1
star
49

ScaleAutomation

Python
1
star
50

py-sgio

Python bindings for SG_IO ioctl on linux
Cython
1
star
51

rrdtool

Shell
1
star
52

py-fenced

Fencing daemon for automatically managing persistent SCSI reservations
Python
1
star