Try Devtron Enterprise!
Start Free Trial
LogoLogo
WebsiteDevtron demoGithub RepoJoin Discord
main
main
  • 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
  • Selecting a Chart Type
  • From Devtron Charts
  • From Deployment Charts
  • Selecting a Chart Version
  • Configuring the Chart
  • Using Basic GUI
  • Using Advanced (YAML)
  • Application Metrics

Was this helpful?

Export as PDF
  1. Usage
  2. Applications
  3. App Configuration

Base Deployment Template

PreviousBuild ConfigurationNextDeployment

Last updated 1 month ago

Was this helpful?

A deployment configuration is a manifest of the application. It defines the runtime behavior of the application. You can select one of the default deployment charts or custom deployment charts which are created by super admin.

To configure a deployment chart for your application, do the following steps:

  • Go to Applications and create a new application.

  • Go to App Configuration page and configure your application.

  • On the Base Deployment Template page, select the drop-down under Chart type.


Selecting a Chart Type

Who Can Perform This Action?

Note

From Devtron Charts

You can select a default deployment chart from the following options:

From Deployment Charts

You can select an available custom chart as shown below. You can also view the description of the custom charts in the list.


Selecting a Chart Version

Who Can Perform This Action?

Once you select a chart type, choose a chart version using which you wish to deploy the application.

Devtron uses helm charts for deployments and it maintains multiple chart versions based on the features it supports.

One can see available chart versions in the drop-down. You can select any chart version as per your requirements. By default, the latest version of the helm chart is selected.

Every chart version has its own YAML file that provides specifications for your application. To make it easy to use, we have created templates for the YAML file and have added some variables inside the YAML. You can provide or change the values of these variables as per your requirement.


Configuring the Chart

Who Can Perform This Action?

Using Basic GUI

If you are not an advanced user, you may use the Basic (GUI) section to configure your chosen chart.

By default, the following fields are available for you to modify in the Basic (GUI) section:

Fields
Description

Arguments

Enable the Arguments to pass one or more argument values. By default, it is in the disabled state.

Command

Enable the Command to pass one or more command values. By default, it is in the disabled state.

HTTP Request Routes

Enable the HTTP Request Routes to define Host, and Path. By default, it is in the disabled state.

  • Host: Domain name of the server.

  • Path: Path of the specific component in the host that the HTTP wants to access.

You can define multiple paths as required by clicking Add path.

Resources

Here, you can tweak the requests and limits of the CPU resource and RAM resource as per the application.

Autoscaling

Define the autoscaling parameters to automatically scale your application's deployment based on resource utilization.

  • Maximum Replicas: The maximum number of replicas your application can scale up to.

  • Minimum Replicas: The minimum number of replicas your application should run at any time.

  • Target CPU Utilization Percentage: The average CPU utilization across all pods that will trigger scaling.

  • Target Memory Utilization Percentage: The average memory utilization across all pods that will trigger scaling.

Environment Variables (Key/Value)

Define key/value by clicking Add variable.

  • Key: Define the key of the environment.

  • Value: Define the value of the environment.

You can define multiple env variables by clicking Add EnvironmentVariables.

Container Port

The internal port on which the container listens for HTTP requests. Specify the container port and optionally the service port that maps to it.

Service

Configure the service that exposes your application to the network.

  • Type: Specify the type of service (e.g., ClusterIP, NodePort, LoadBalancer).

  • Annotations: Add custom annotations to the service for additional configuration.

Readiness Probe

Define the readiness probe to determine when a container is ready to start accepting traffic.

  • Path: The HTTP path that the readiness probe will access.

  • Port: The port on which the readiness probe will access the application.

Liveness Probe

Define the liveness probe to check if the container is still running and to restart it if it is not.

  • Path: The HTTP path that the liveness probe will access.

  • Port: The port on which the liveness probe will access the application.

Tolerations

Define tolerations to allow the pods to be scheduled on nodes with matching taints.

  • Key: The key of the taint to tolerate.

  • Operator: The relationship between the key and the value (e.g., Exists, Equal).

  • Value: The value of the taint to match.

  • Effect: The effect of the taint to tolerate (e.g., NoSchedule, NoExecute).

ServiceAccount

Specify the service account for the deployment to use, allowing it to access Kubernetes API resources.

  • Create: Toggle to create a new service account.

  • Name: The name of the service account to use.

Click Save Changes. If you want to do additional configurations, then click the Switch to Advanced button or Advanced (YAML) button for modifications.

Note

  • If you change any values in the 'Basic (GUI)', then the corresponding values will change in 'Advanced (YAML)' too.

  • Users who are not super-admins will land on 'Basic (GUI)' section when they visit Base Deployment Template page; whereas super-admins will land on 'Advanced (YAML)' section. This is just a default behavior; therefore, they can still navigate to the other section if needed.

Who Can Perform This Action?

Superadmin can define and apply custom deployment schema.

This is useful in scenarios where:

  • You frequently edit certain fields in Advanced (YAML), which you expect to remain easily accessible in Basic (GUI) section.

  • You don't require some fields in Basic (GUI) section.

  • You need the autonomy to keep the Basic (GUI) unique for applications/clusters/environments/charts, or display the same Basic (GUI) everywhere.

There are two ways you can customize the Basic GUI, use any one of the following:

  1. Using APIs (explained below)

You can pass a custom JSON (deployment schema) of your choice through the following API. You may need to run the API with the POST method if you are doing it for the first time.

PUT {{DEVTRON_BASEURL}}/orchestrator/deployment/template/schema
Sample API Request Body
{
  "name": "schema-1",
  "type": "JSON",
  "schema": "{\"type\":\"object\",\"properties\":{\"args\":{\"type\":\"object\",\"title\":\"Arguments\",\"properties\":{\"value\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"title\":\"Value\"},\"enabled\":{\"type\":\"boolean\",\"title\":\"Enabled\"}}},\"command\":{\"type\":\"object\",\"title\":\"Command\",\"properties\":{\"value\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"title\":\"Value\"},\"enabled\":{\"type\":\"boolean\",\"title\":\"Enabled\"}}},\"resources\":{\"type\":\"object\",\"title\":\"Resources(CPU&RAM)\",\"properties\":{\"limits\":{\"type\":\"object\",\"required\":[\"cpu\",\"memory\"],\"properties\":{\"cpu\":{\"type\":\"string\"},\"memory\":{\"type\":\"string\"}}},\"requests\":{\"type\":\"object\",\"properties\":{\"cpu\":{\"type\":\"string\"},\"memory\":{\"type\":\"string\"}}}}},\"autoscaling\":{\"type\":\"object\",\"title\":\"Autoscaling\",\"properties\":{\"MaxReplicas\":{\"type\":[\"integer\",\"string\"],\"title\":\"MaximumReplicas\",\"pattern\":\"^[a-zA-Z0-9-+\\\\/*%_\\\\\\\\s]+$\"},\"MinReplicas\":{\"type\":[\"integer\",\"string\"],\"title\":\"MinimumReplicas\",\"pattern\":\"^[a-zA-Z0-9-+\\\\/*%_\\\\\\\\s]+$\"},\"TargetCPUUtilizationPercentage\":{\"type\":[\"integer\",\"string\"],\"title\":\"TargetCPUUtilizationPercentage\",\"pattern\":\"^[a-zA-Z0-9-+\\\\/*%_\\\\\\\\s]+$\"},\"TargetMemoryUtilizationPercentage\":{\"type\":[\"integer\",\"string\"],\"title\":\"TargetMemoryUtilizationPercentage\",\"pattern\":\"^[a-zA-Z0-9-+\\\\/*%_\\\\\\\\s]+$\"}}},\"EnvVariables\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"key\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"}}},\"title\":\"EnvironmentVariables\"},\"ContainerPort\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"port\":{\"type\":\"integer\"}}},\"title\":\"ContainerPort\"}}}",
  "selectors": [
    {
      "attributeSelector": {
        "category": "APP",
        "appNames": ["my-demo-app"]
      }
    },
    {
      "attributeSelector": {
        "category": "ENV",
        "envNames": ["env1", "env2", "env3"]
      }
    },
    {
      "attributeSelector": {
        "category": "CLUSTER",
        "clusterNames": ["cluster1", "cluster2", "cluster3"]
      }
    },
    {
      "attributeSelector": {
        "category": "CHART_REF",
        "chartVersions": [
          {
            "type": "Deployment",
            "version": "1.0.0"
          }
        ]
      }
    },
    {
      "attributeSelector": {
        "category": "APP_ENV",
        "appEnvNames": [
          {
            "appName": "my-demo-app",
            "envName": "devtron"
          }
        ]
      }
    }
  ]
}
  1. In the name field, give a name to your schema, e.g., schema-1

  2. Enter the type as JSON.

  3. The schema field is for entering your custom deployment schema. Perform the following steps:

    • Copy the final JSON and stringify it using any free online tool.

    • Paste the stringified JSON in the schema field of the API request body.

    • Send the API request. If your schema already exists, use the PUT method instead of POST in the API call.

  4. The attributeSelector object helps you choose the scope at which your custom deployment schema will take effect.

    Priority
    Category Scope
    Description

    1 (High)

    APP_ENV

    Specific to an application and its environment

    2

    APP

    Applies at the application level if no specific environment is defined

    3

    ENV

    Applies to specific deployment environment

    4

    CHART_REF

    Applies to all applications using a specific chart type and version

    5

    CLUSTER

    Applies across all applications and environments within a specific cluster

    6

    GLOBAL

    Universally applies if no other more specific schemas are defined

Using Advanced (YAML)

If you are an advanced user wishing to perform additional configurations, you may switch to Advanced (YAML) for modifications.

Refer the respective templates to view the YAML details.


Application Metrics

Depending on the chart type and version you select, application metrics of your application may be viewed. This includes:

  • Status codes 2xx, 3xx, 5xx

  • Throughput

  • Latency ...and many more

Enable Show application metrics toggle to view the application metrics on the App Details page.

IMPORTANT: Enabling application metrics introduces a sidecar container to your main container which may require some additional configuration adjustments. We recommend you to do load test after enabling it in a non-production environment before enabling it in production environment.

Select Save & Next to save your configurations.

Users need to have or above to select a chart.

After you select and save a chart type for a given application, you won't be able to change it later. Make sure to choose the correct chart type before saving. You can select a chart from or other .

(Recommended)

This option will be available only if a custom chart exists. If it doesn't, a user with super admin permission may upload one in .

Selecting Custom Chart

Users need to have or above to select a chart version.

Selecting Chart Version

Users need to have or above to configure a chart. However, super-admins can lock keys in base deployment template to prevent non-super-admins from modifying them. Refer to know more.

Customize Basic GUI

By default, the Basic (GUI) section comes with multiple predefined fields as seen earlier . However, if you wish to display a different set of fields to your team, you can modify the whole section as per your requirement.

Your team members find it difficult to understand and edit the section.

From section

To create a custom schema of your choice, you may use .

Show application metrics
Deployment
Rollout Deployment
Job & CronJob
StatefulSet
Global Configurations → Deployment Charts
RJSF JSON Schema Tool
Deployment
Rollout Deployment
Job & CronJob
StatefulSet
Devtron Charts
Deployment Charts
in the table
Advanced (YAML)
Lock Deployment Configuration
Deployment Charts
Admin role
Admin role
Admin role