Skip to main content
Version: v2.0-v2.4

Creating Catalog Apps

Rancher's catalog service requires any custom catalogs to be structured in a specific format for the catalog service to be able to leverage it in Rancher.

For a complete walkthrough of developing charts, see the Chart Template Developer's Guide in the official Helm documentation.

Chart Types

Rancher supports two different types of charts: Helm charts and Rancher charts.

Helm Charts

Native Helm charts include an application along with other software required to run it. When deploying native Helm charts, you'll learn the chart's parameters and then configure them using Answers, which are sets of key value pairs.

The Helm Stable and Helm Incubators are populated with native Helm charts. However, you can also use native Helm charts in Custom catalogs (although we recommend Rancher Charts).

Rancher Charts

Rancher charts mirror native Helm charts, although they add two files that enhance user experience: app-readme.md and questions.yaml. Read more about them in Additional Files for Rancher Charts.

Advantages of Rancher charts include:

  • Enhanced revision tracking: While Helm supports versioned deployments, Rancher adds tracking and revision history to display changes between different versions of the chart.
  • Streamlined application launch: Rancher charts add simplified chart descriptions and configuration forms to make catalog application deployment easy. Rancher users need not read through the entire list of Helm variables to understand how to launch an application.
  • Application resource management: Rancher tracks all the resources created by a specific application. Users can easily navigate to and troubleshoot on a page listing all the workload objects used to power an application.

Chart Directory Structure

The following table demonstrates the directory structure for a Rancher Chart. The charts directory is the top level directory under the repository base. Adding the repository to Rancher will expose all charts contained within it. This information is helpful when customizing charts for a custom catalog. The questions.yaml, README.md, and requirements.yml files are specific to Rancher charts, but are optional for chart customization.

<Repository-Base>/

├── charts/
│ ├── <Application Name>/ # This directory name will be surfaced in the Rancher UI as the chart name
│ │ ├── <App Version>/ # Each directory at this level provides different app versions that will be selectable within the chart in the Rancher UI
│ │ │ ├── Chart.yaml # Required Helm chart information file.
│ │ │ ├── questions.yaml # Form questions displayed within the Rancher UI. Questions display in Configuration Options.*
│ │ │ ├── README.md # Optional: Helm Readme file displayed within Rancher UI. This text displays in Detailed Descriptions.
│ │ │ ├── requirements.yml # Optional: YAML file listing dependencies for the chart.
│ │ │ ├── values.yml # Default configuration values for the chart.
│ │ │ ├── templates/ # Directory containing templates that, when combined with values.yml, generates Kubernetes YAML.

Additional Files for Rancher Charts

Before you create your own custom catalog, you should have a basic understanding about how a Rancher chart differs from a native Helm chart. Rancher charts differ slightly from Helm charts in their directory structures. Rancher charts include two files that Helm charts do not.

  • app-readme.md

    A file that provides descriptive text in the chart's UI header. The following image displays the difference between a Rancher chart (which includes app-readme.md) and a native Helm chart (which does not).

    Rancher Chart with app-readme.md (left) vs. Helm Chart without (right)

    app-readme.md

  • questions.yml

    A file that contains questions for a form. These form questions simplify deployment of a chart. Without it, you must configure the deployment using key value pairs, which is more difficult. The following image displays the difference between a Rancher chart (which includes questions.yml) and a native Helm chart (which does not).

    Rancher Chart with questions.yml (left) vs. Helm Chart without (right)

    questions.yml

questions.yml

Inside the questions.yml, most of the content will be around the questions to ask the end user, but there are some additional fields that can be set in this file.

Min/Max Rancher versions

Available as of v2.3.0

For each chart, you can add the minimum and/or maximum Rancher version, which determines whether or not this chart is available to be deployed from Rancher.

Note: Even though Rancher release versions are prefixed with a v, there is no prefix for the release version when using this option.

rancher_min_version: 2.3.0
rancher_max_version: 2.3.99

Question Variable Reference

This reference contains variables that you can use in questions.yml nested under questions:.

VariableTypeRequiredDescription
variablestringtrueDefine the variable name specified in the values.yml file, using foo.bar for nested objects.
labelstringtrueDefine the UI label.
descriptionstringfalseSpecify the description of the variable.
typestringfalseDefault to string if not specified (current supported types are string, multiline, boolean, int, enum, password, storageclass, hostname, pvc, and secret).
requiredboolfalseDefine if the variable is required or not (true | false)
defaultstringfalseSpecify the default value.
groupstringfalseGroup questions by input value.
min_lengthintfalseMin character length.
max_lengthintfalseMax character length.
minintfalseMin integer length.
maxintfalseMax integer length.
options[]stringfalseSpecify the options when the variable type is enum, for example: options:
- "ClusterIP"
- "NodePort"
- "LoadBalancer"
valid_charsstringfalseRegular expression for input chars validation.
invalid_charsstringfalseRegular expression for invalid input chars validation.
subquestions[]subquestionfalseAdd an array of subquestions.
show_ifstringfalseShow current variable if conditional variable is true. For example show_if: "serviceType=Nodeport"
show_subquestion_ifstringfalseShow subquestions if is true or equal to one of the options. for example show_subquestion_if: "true"

Note: subquestions[] cannot contain subquestions or show_subquestions_if keys, but all other keys in the above table are supported.

Tutorial: Example Custom Chart Creation

For a tutorial on adding a custom Helm chart to a custom catalog, refer to this page.