Try Devtron Enterprise!
Start Free Trial
LogoLogo
WebsiteDevtron demoGithub RepoJoin Discord
v0.7
v0.7
  • Introduction
  • Getting Started
  • Install Devtron
    • Install Devtron with CI/CD
    • Install Devtron with CI/CD and GitOps (Argo CD)
    • Install Devtron without Integrations
    • Install Devtron on Minikube, Microk8s, K3s, Kind, Cloud VMs
    • Install Devtron on Airgapped Environment
    • Demo on Popular Cloud Providers
    • Backup for Disaster Recovery
    • Uninstall Devtron
    • FAQs
  • Install Devtron Enterprise Trial
  • Devtron Kubernetes Client
  • Configurations
    • Installation Configurations
    • Override Configurations
    • Ingress Setup
  • Global Configurations
    • Host URL
    • GitOps
    • Projects
    • Clusters & Environments
    • Git Accounts
    • Container/OCI Registry
    • Chart Repositories
    • Deployment Charts
    • Authorization
      • SSO Login Services
        • Google
        • GitHub
        • GitLab
        • Microsoft
        • LDAP
        • OIDC
          • Keycloak
          • Okta
        • OpenShift
      • User Permissions
      • Permission Groups
      • API Tokens
    • Notifications
    • Deployment Window
    • Approval Policy
    • External Links
    • Catalog Framework
    • Scoped Variables
    • Plugin Policy
    • Pull Image Digest
    • Tags Policy
    • Filter Condition
    • Lock Deployment Configuration
    • Image Promotion Policy
    • Build Infra
  • Devtron Upgrade
    • Update Devtron from Devtron UI
    • Upgrade to 1.5.0
    • 0.6.x-0.7.x
    • 0.5.x-0.6.x
    • 0.4.x-0.5.x
    • 0.4.x-0.4.x
    • 0.3.x-0.4.x
    • 0.3.x-0.3.x
    • 0.2.x-0.3.x
  • Usage
    • Applications
      • Create a New Application
      • Clone an Existing Application
      • Deploy a Sample Application
      • App Configuration
        • Git Repository
        • Build Configuration
        • Base Deployment Template
          • Deployment
          • Rollout Deployment
          • Job and Cronjob
          • StatefulSets
        • GitOps Configuration
        • Workflow Editor
          • CI Pipeline
            • Pre-Build/Post-Build Stages
            • Override Build Configuration
          • CD Pipeline
        • ConfigMaps
        • Secrets
          • External Secret Operator (ESO)
            • AWS Secrets Manager
            • Google Secrets Manager
            • HashiCorp Vault
        • Environment Overrides
        • Deleting Application
      • Build and Deploy
        • Triggering CI
        • Triggering CD
        • Rollback Deployment
        • Applying Labels to Images
      • App Details
        • Debugging Deployment And Monitoring
        • Using Ephemeral Containers
        • Application Metrics
      • Application Overview
    • Jobs
      • Create a new job
      • Configurations
      • Workflow Editor
      • Trigger Job
      • Overview
    • Application Groups
    • Software Distribution Hub
      • Tenants
      • Release Hub
    • Resource Browser
    • Resource Watcher
    • Charts
      • Charts Overview
      • Deploy & Observe
      • Examples
        • Deploying Mysql Helm Chart
        • Deploying MongoDB Helm Chart
      • Chart Group
    • Security
      • Security Scans
      • Security Policies
    • Bulk Edit
    • Integrations
      • Build and Deploy (CI/CD)
      • GitOps (Argo CD)
      • Vulnerability Scanning (Clair)
      • Notifications
      • Monitoring (Grafana)
    • Pipeline Plugins
      • Create Your Plugin
      • Our Plugins
        • Ansible Runner
        • Bitbucket Runner Trigger
        • Codacy
        • Code-Scan
        • Copacetic
        • Container Image Exporter
        • Copy Container Image
        • Cosign
        • CraneCopy
        • Dependency track - Maven & Gradle
        • Dependency track - NodeJS
        • Dependency track - Python
        • Devtron CD Trigger
        • Devtron CI Trigger
        • Devtron Job Trigger
        • DockerSlim
        • EKS Create Cluster
        • GCS Create Bucket
        • GitHub Pull Request Updater
        • GKE Provisioner
        • GoLang-migrate
        • Jenkins
        • Jira Issue Validator
        • Jira Issue Updater
        • K6 Load Testing
        • Pull images from container repository
        • Semgrep
        • SonarQube
        • SonarQube v1.1.0
        • Terraform CLI
        • Vulnerability Scanning
  • Resources
    • Glossary
    • Troubleshooting
    • Use Cases
      • Devtron Generic Helm Chart To Run CronJob Or One Time Job
      • Connect SpringBoot with Mysql Database
      • Connect Expressjs With Mongodb Database
      • Connect Django With Mysql Database
      • Pull Helm Charts from OCI Registry
    • Telemetry Overview
    • Devtron on Graviton
    • Release Notes
Powered by GitBook
On this page
  • Introduction
  • Tutorial
  • Preparing a Deployment Chart
  • 1. Create a Helm Chart
  • 2. Create an Image Descriptor Template File
  • 3. Add app-values.yaml
  • 4. Add release-values.yaml
  • 5. Package the chart in a tgz format
  • Uploading a Deployment Chart
  • Steps
  • Validation Checks
  • Viewing Deployment Charts
  • Using Deployment Chart in Application
  • Editing GUI Schema of Deployment Charts
  • Tutorial
  • Steps

Was this helpful?

Export as PDF
  1. Global Configurations

Deployment Charts

PreviousChart RepositoriesNextAuthorization

Last updated 1 month ago

Was this helpful?

Introduction

Devtron Apps leverage helm charts to carry out deployment of your images and configuration. Devtron includes predefined Helm charts (e.g., Deployment, Rollout, StatefulSet) that cover majority of your use cases.

For any use case not addressed by the default Helm charts, you can upload your own Helm chart and use it as a deployment chart in Devtron.

Figure 1: Deployment Charts

Tutorial


Preparing a Deployment Chart

1. Create a Helm Chart

You can use the following command to create a Helm chart:

helm create my-custom-chart
Field
Description

Name

Name of the Helm chart (Required).

Version

This is the chart version. Update this value for each new version of the chart (Required).

Description

Give a description to your chart (Optional).

Example of Chart.yaml

2. Create an Image Descriptor Template File

The Image Descriptor Template file is a GO template that produces a valid JSON file upon processing. It allows Devtron to dynamically inject values from the CD pipeline into your Helm chart during deployment. Therefore, details like image repository, tag, and environment are automatically populated at the placeholders specified in .image_descriptor_template.json.

  • In the root directory of your chart, create a file named .image_descriptor_template.json using the following command:

    touch .image_descriptor_template.json
  • Ensure the above file is created in the directory where the main Chart.yaml exists (as shown below):

  • Paste the following content in .image_descriptor_template.json file:

    {
        "server": {
            "deployment": {
                "image_tag": "{{.Tag}}",
                "image": "{{.Name}}"
            }
        },
        "pipelineName": "{{.PipelineName}}",
        "releaseVersion": "{{.ReleaseVersion}}",
        "deploymentType": "{{.DeploymentType}}",
        "app": "{{.App}}",
        "env": "{{.Env}}",
        "appMetrics": {{.AppMetrics}}
    }

    You can customize this template to include only the values your deployment needs. For instance, if you only require the image repository and tag, your template would look like:

    {
        "image": {
            "repository": "{{.Name}}",
            "tag": "{{.Tag}}"
        }
    }

Got a JSON Error?

If your code editor highlights a syntax error (property or EOF error) in the above JSON, ignore it.

3. Add app-values.yaml

The app-values.yaml file is simply a subset of your values.yaml file. Therefore, you can insert specific entries from values.yaml that you wish to display.

However, if you upload the chart without an app-values.yaml or with an empty one, your deployment template will appear blank (as shown below) or null.

4. Add release-values.yaml

  • You can use autoPromotionSeconds to decide how long to keep old pods running once the latest pods of new release are available.

In the root directory of your chart, create a file named release-values.yaml with the following command:

touch release-values.yaml

Use the following content in the release-values.yaml file (edit it as per your requirement):

server:
 deployment:
   image_tag: IMAGE_TAG
   image: IMAGE_REPO
   enabled: false
dbMigrationConfig:
  enabled: false

pauseForSecondsBeforeSwitchActive: 0
waitForSecondsBeforeScalingDown: 0
autoPromotionSeconds: 30

#used for deployment algo selection
orchestrator.deploymant.algo: 1 

5. Package the chart in a tgz format

The Helm chart to be uploaded must be packaged as a versioned archive file in the format: <helm-chart-name>-x.x.x.tgz. Both <helm-chart-name> and x.x.x will be automatically fetched from the name and version fields present in the Chart.yaml file, respectively."

Note

Ensure you navigate out of the Helm chart folder before packaging it in a '.tgz' format

Run the following command to package the chart:

helm package my-custom-chart

The above command will generate a <helm-chart-name>-x.x.x.tgz file.


Uploading a Deployment Chart

Who Can Perform This Action?

Only super admin users can upload a deployment chart. A super admin can upload multiple versions of a chart.

Steps

  • Go to Global Configurations → Deployment Charts.

  • Click Upload Chart.

  • Click Select .tgz file and upload your packaged deployment chart (in .tgz format).

The system initiates the validation of your uploaded chart. You may also click Cancel upload if you wish to abort the process.

Validation Checks

In the uploading process, your file will be validated against the following criteria:

  • Supported archive template should be in *.tgz format.

  • Chart.yaml must include the name and the version number.

  • .image_descriptor_template.json file should be present.

The following are interpretations of the validation checks performed:

Validation Status
Description
User Action

Success

Enter a description for the chart and select Save or Cancel upload

Unsupported template

Upload another chart or Cancel upload

New version detected

Enter a Description and select Save to continue uploading, or Cancel upload

Already exists

  • Edit the version and re-upload the same chart using Upload another chart.

  • Upload a new chart with a new name using Upload another chart

  • Cancel upload


Viewing Deployment Charts

Who Can Perform This Action?

Only super-admins can view deployment charts.

To view the list of available deployment charts, go to Global Configurations → Deployment Charts page.

  • You can search a chart by its name, version, or description.


Using Deployment Chart in Application

Note


Who Can Perform This Action?

Only super-admins can edit the GUI schema of deployment charts.

Reference

You can edit the GUI schema of the following deployment charts:

  1. Default charts provided by Devtron (Deployment, Job & CronJob, Rollout Deployment, and StatefulSet)

  2. Custom charts uploaded by you

Tutorial

Steps

In this example, we will edit the Deployment chart type provided by Devtron.

  1. Click the edit button next to the chart as shown below.

  2. You may start editing the schema by excluding existing fields/objects or including more of them. Click the Refer YAML button to view all the supported fields.

  3. While editing the schema, you may use the Preview GUI option for a real-time preview of your changes.

  4. Click Save Changes.

Next, if you go to App Configuration → Base Configurations → Deployment Template, you will be able to see the deployment template fields (in GUI) as per your customized schema.

This video contains a quick walkthrough of the steps mentioned in the section of this page and the subsequent uploading of the deployment chart on Devtron.

Note: Chart.yaml is a metadata file that gets created when you create a . The following table consists the fields that are relevant to you in Chart.yaml.

to view a sample 'Chart.yaml' file.

Figure 2: Filepath of Image Descriptor Template

In the root directory of your chart, Devtron expects an app-values.yaml file. It uses this file to determine the values to be displayed on the as shown below.

Figure 3: Chart Values
Figure 4: Blank Chart Values

The release-values.yaml file contains essential values needed for deployment that aren’t covered by . For example:

Some dynamic values (such as IMAGE_TAG and IMAGE_REPO from the ) are populated here because they are needed for deployment.

Figure 5: Global Configurations - Deployment Charts
Figure 6: Upload Chart Button
Figure 7: Uploading .tgz File
Figure 8: Cancelling Upload

The files uploaded are validated ()

The archive file do not match the ()

You are uploading a newer version of an existing chart ()

There already exists a chart with the same version ()

Figure 9: Viewing Deployment Charts

You can add new by clicking Upload Chart.

Once you successfully upload a deployment chart, you can start using it as a deployment template for your application. Refer to know more.

Figure 10: Using Deployment Charts

The deployment strategy for a deployment chart is fetched from the chart template and cannot be configured in the .

Editing GUI Schema of Deployment Charts

This section is an extension of feature. Refer the document to know more about the significance of having a custom GUI schema for your deployment templates.

Figure 11: Edit GUI Schema Button

A GUI schema is available for you to edit in case of Devtron charts. In case of custom charts, you may have to define a GUI schema yourself. To know how to create such GUI schema, refer .

Figure 12: Editable Schema
Figure 13: Refer YAML Button
Figure 14: Preview GUI Button
Figure 15: Save Changes
helm chart
Click here
Deployment Template
RJSF JSON Schema Tool
Preparing a Deployment Chart
app-values.yaml
image descriptor JSON file
charts or chart versions
View Snapshot
View Snapshot
View Snapshot
View Snapshot
required template
CD pipeline
deployment template
Customize GUI