Try Devtron Enterprise for FREE!
Start Now
LogoLogo
WebsiteDevtron demoGithub RepoJoin Discord
v0.6
v0.6
  • 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
    • Demo on Popular Cloud Providers
    • Backup for Disaster Recovery
    • Uninstall Devtron
    • FAQs
  • 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
    • Custom Charts
    • Authorization
      • SSO Login Services
        • Google
        • GitHub
        • GitLab
        • Microsoft
        • LDAP
        • OIDC
        • OpenShift
        • Example - Okta SSO
      • User Permissions
      • Permission Groups
      • API Tokens
    • Notifications
    • External Links
    • Catalog Framework
    • Scoped Variables
    • Pull Image Digest
    • Tags Policy
    • Lock Deployment Configuration
    • Image Promotion Policy
    • Filter Condition
    • Build Infra
  • Devtron Upgrade
    • Update Devtron from Devtron UI
    • 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
          • CI Pipeline (Legacy)
          • CD Pipeline
        • ConfigMaps
        • Secrets
          • External Secret Operator (ESO)
            • AWS Secrets Manager
            • Google Secrets Manager
            • HashiCorp Vault
        • Protect Configuration
        • Environment Overrides
        • Deleting Application
      • Build and Deploy
        • Triggering CI
        • Triggering CD
        • Rollback Deployment
      • App Details
        • Debugging Deployment And Monitoring
        • Using Ephemeral Containers
        • Application Metrics
      • Overview
    • Jobs
      • Create a new job
      • Configurations
      • Workflow Editor
      • Trigger Job
      • Overview
    • Application Groups
    • Resource Browser
    • 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
      • Codacy
      • Copy Container Image
      • Dependency track - Maven & Gradle
      • Dependency track - NodeJS
      • Dependency track - Python
      • K6 Load Testing
      • Semgrep
      • SonarQube
      • SonarQube v1.1.0
  • 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
  • Prerequisites
  • 1. How to create a helm chart
  • 2. Create the image descriptor template file .image_descriptor_template.json
  • 3. Package the custom chart in the *.tgz format
  • Uploading a custom chart
  • Validation
  • View the custom charts
  • Use the custom chart in an application

Was this helpful?

Export as PDF
  1. Global Configurations

Custom Charts

PreviousChart RepositoriesNextAuthorization

Last updated 10 months ago

Was this helpful?

Devtron includes predefined helm charts that cover the majority of 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 custom chart in Devtron.

  • Who can upload a custom chart - Super admins

  • Who can use the custom chart - All users

A super admin can upload multiple versions of a custom helm chart.

Custom charts

Prerequisites

  1. A valid helm chart, which contains Chart.yaml file with name and version fields.

  2. Image descriptor template file .image_descriptor_template.json.

  3. Custom chart packaged in the *.tgz format.

1. How to create a helm chart

You can use the following command to create the 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

Description of the chart (Optional).

Please see the following example:

2. Create the image descriptor template file .image_descriptor_template.json

It's a GO template file that should produce a valid JSON file upon rendering. This file is passed as the last argument in helm install -f myvalues.yaml -f override.yaml command.

Place the .image_descriptor_template.json file in the root directory of your chart.

You can use the following variables in the helm template (all the placeholders are optional):

The values from the CD deployment pipeline are injected at the placeholder specified in the .image_descriptor_template.json template file.

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

image_tag

The build image tag

image

Repository name

pipelineName

The CD pipeline name created in Devtron

releaseVersion

Devtron's internal release number

deploymentType

Deployment strategy used in the pipeline

app

Application's ID within the Devtron ecosystem

env

Environment used to deploy the chart

appMetrics

For the App metrics UI feature to be effective, include the appMetrics placeholder.

For example:

To create a template file to allow Devtron to only render the repository name and the tag from the CI/CD pipeline that you created, edit the .image_descriptor_template.json file as:

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

3. Package the custom chart in the *.tgz format

Before you begin, ensure that your helm chart includes both Chart.yaml (with name and version fields) and .image_descriptor_template.json files.

The helm chart to be uploaded must be packaged as a versioned archive file in the format <helm-chart-name>-vx.x.x.tgz.

helm package my-custom-chart

The above command will create a my-custom-chart-0.1.0.tgz file.

Uploading a custom chart

A custom chart can only be uploaded by a super admin.

  • On the Devtron dashboard, select Global Configurations > Custom charts.

  • Select Import Chart.

  • Select tar.gz file... and upload the packaged custom chart in the *.tgz format.

The chart is being uploaded and validated. You may also Cancel upload if required.

Validation

The uploaded archive will be validated against:

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

  • Content of values.yaml should be there in app-values.yaml file.

  • release-values.yaml file is required.

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

  • ..image_descriptor_template.json file should be present and the field format must match the format listed in the image builder template section.

The following are the validation results:

Validation status
Description
User action

Success

The files uploaded are validated.

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

Unsupported template

Upload another chart or Cancel upload.

New version detected

You are uploading a newer version of an existing chart

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

Already exists

There already exists a chart with the same version.

  • 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.

View the custom charts

All users can view the custom charts.

To view a list of available custom charts, go to Global Configurations > Custom charts page.

  • The charts can be searched with their name, version, or description.

Use the custom chart in an application

Info:

Note: Chart.yaml is the metadata file that gets created when you create a .

Chart.yaml file
Selecting custom chart
Uploading custom chart

ConfigMap/Secret template should be same as that of our .

The archive file do not match the .

Chart validated
Unsupported template
New version detected
Already exists

New by selecting Upload chart.

Custom charts

The custom charts can be used from the section.

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

helm chart
reference chart
Deployment Template
custom charts can be uploaded
required template
CD pipeline