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
  • Introduction
  • Steps to Configure GitOps
  • Feature Flag
  • Supported Git Providers
  • GitHub
  • GitLab
  • Azure
  • Bitbucket
  • Miscellaneous
  • Creating Organization in GitHub
  • Creating Group in GitLab
  • Creating Project in Azure DevOps
  • Creating Workspace in Bitbucket

Was this helpful?

Export as PDF
  1. Global Configurations

GitOps

PreviousHost URLNextProjects

Last updated 10 months ago

Was this helpful?

Introduction

In Devtron, you can either use Helm or GitOps (Argo CD) to deploy your applications and charts. GitOps is a branch of DevOps that focuses on using Git repositories to manage infrastructure and application code deployments.

If you use the GitOps approach, Devtron will store Kubernetes configuration files and the desired state of your applications in Git repositories.


Steps to Configure GitOps

Who Can Perform This Action?

Users need to have super-admin permission to configure GitOps.

  1. Go to Global Configurations → GitOps

    Figure 1: Global Configuration - GitOps
  2. Select any one of the to configure GitOps.

    Figure 2: Selecting a Provider

The Git provider you select for configuring GitOps might impact the following sections:

  1. In the Directory Management in Git section, you get the following options:

    • Use default git repository structure:

      This option lets Devtron automatically create a GitOps repository within your organization. The repository name will match your application name, and it cannot be changed. Since Devtron needs admin access to create the repository, ensure the Git credentials you provided in Step 3 have administrator rights.

    • Allow changing git repository for application:

  2. Click Save/Update. A green tick will appear on the active Git provider.

Feature Flag

Alternatively, you may use the feature flag FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE to enable or disable custom GitOps repo.

For disabling - FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: "false" For enabling - FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: "true"

How to Use Feature Flag

  1. Select the cluster where Devtron is running, i.e., default_cluster.

  2. Go to the Config & Storage dropdown on the left.

  3. Click ConfigMap.

  4. Use the namespace filter (located on the right-hand side) to select devtroncd namespace. Therefore, it will show only the ConfigMaps related to Devtron, and filter out the rest.

  5. Find the ConfigMap meant for the dashboard of your Devtron instance, i.e., dashboard-cm (with an optional suffix).

  6. Click Edit Live Manifest.

  7. Add the feature flag (with the intended boolean value) within the data dictionary

  8. Click Apply Changes.


Supported Git Providers

Below are the Git providers supported in Devtron for storing configuration files.

GitHub

Prerequisite

  1. A GitHub account

Fill the following mandatory fields:

Field
Description

Git Host

Shows the URL of GitHub, e.g., https://github.com/

GitHub Organisation Name

GitHub Username

Provide the username of your GitHub account

Personal Access Token

GitLab

Prerequisite

  1. A GitLab account

Fill the following mandatory fields:

Field
Description

Git Host

Shows the URL of GitLab, e.g., https://gitlab.com/

GitLab Group ID

GitLab Username

Provide the username of your GitLab account

Personal Access Token

Azure

Prerequisite

Fill the following mandatory fields:

Field
Description

Azure DevOps Organisation Url*

Azure DevOps Project Name

Azure DevOps Username*

Provide the username of your Azure DevOps account

Azure DevOps Access Token*

Bitbucket

Here, you get 2 options:

Bitbucket Cloud

Prerequisite

  1. A Bitbucket account

Fill the following mandatory fields:

Field
Description

Bitbucket Host

Shows the URL of Bitbucket Cloud, e.g., https://bitbucket.org/

Bitbucket Workspace ID

Bitbucket Project Key

Bitbucket Username*

Provide the username of your Bitbucket account

Personal Access Token

Bitbucket Data Center

Prerequisite

A Bitbucket Data Center account

Fill the following mandatory fields:

Field
Description

Bitbucket Host

Enter the URL address of your Bitbucket Data Center, e.g., https://bitbucket.mycompany.com

Bitbucket Project Key

Bitbucket Username*

Provide the username of your Bitbucket Data Center account

Password

Provide the password to authenticate your Bitbucket Data Center account


Miscellaneous

Creating Organization in GitHub

We do NOT recommend using GitHub organization that contains your source code.

  1. Create a new account on GitHub (if you do not have one).

  2. On the upper-right corner of your GitHub page, click your profile photo, then click Settings.

  3. On the Access section, click Organizations.

  4. On the Organizations section, click New organization.

  5. On the Set up your organization page,

    • Enter the organization account name, contact email.

    • Select the option your organization belongs to.

    • Verify your account and click Next.

    • Your GitHub organization name will be created.

  6. Go to your profile and click Your organizations to view all the organizations you created.

Note:

  • repo - Full control of private repositories (able to access commit status, deployment status, and public repositories).

  • admin:org - Full control of organizations and teams (Read and write access).

  • delete_repo - Grants delete repo access on private repositories.

Creating Group in GitLab

  1. Create a new account on GitLab (if you do not have one).

  2. You can create a group by going to the 'Groups' tab on the GitLab dashboard and click New group.

  3. Select Create group.

  4. Enter the group name (required) and select the optional descriptions if required, and click Create group.

  5. Your group will be created and your group name will be assigned with a new Group ID (e.g. 61512475).

Note:

  • api - Grants complete read/write access to the scoped project API.

  • write_repository - Allows read/write access (pull, push) to the repository.

Creating Project in Azure DevOps

  1. Go to Azure DevOps and navigate to Projects.

  2. Select your organization and click New project.

  3. On the Create new project page,

    • Enter the project name and description of the project.

    • Select the visibility option (private or public), initial source control type, and work item process.

    • Click Create.

    • Azure DevOps displays the project welcome page with the project name.

Note:

Creating Workspace in Bitbucket

  1. Create a new individual account on Bitbucket (if you do not have one).

  2. Select your profile and settings avatar on the upper-right corner of the top navigation bar.

  3. Select All workspaces from the dropdown menu.

  4. Select the Create workspace on the upper-right corner of the Workspaces page.

  5. On the Create a Workspace page:

  • Enter a Workspace name.

  • Enter a Workspace ID. Your ID cannot have any spaces or special characters, but numbers and capital letters are fine. This ID becomes part of the URL for the workspace and anywhere else where there is a label that identifies the team (APIs, permission groups, OAuth, etc.).

  • Click Create.

  1. Your Workspace name and Workspace ID will be created.

Note:

  • repo - Full control of repositories (Read, Write, Admin, Delete) access.

Fill all the mandatory fields. Refer to know more about the respective fields.

Figure 3: Entering Git Credentials

Select this option if you wish to use your own GitOps repo. This is ideal if there are any confidentiality/security concerns that prevent you from giving us admin access. Therefore, the onus is on you to create a GitOps repo with your Git provider, and then on Devtron. Make sure the Git credentials you provided in Step 3 have at least read/write access. Choosing this option will unlock a page under the tab.

Figure 4: Need for User-defined Git Repo
Using Feature Flag

Go to .

A GitHub organization. If you don't have one, refer .

Enter the GitHub organization name. If you do not have one, refer .

Provide your personal access token (PAT). It is used as an alternate password to authenticate your GitHub account. If you do not have one, create a GitHub PAT .

A GitLab group. If you don't have one, refer .

Enter the GitLab group ID. If you do not have one, refer .

Provide your personal access token (PAT). It is used as an alternate password to authenticate your GitLab account. If you do not have one, create a GitLab PAT .

An organization on Azure DevOps. If you don't have one, refer .

A project in your Azure DevOps organization. Refer .

Enter the Org URL of Azure DevOps. Format should be https://dev.azure.com/<org-name>, where <org-name> represents the organization name, e.g.,

Enter the Azure DevOps project name. If you do not have one, refer .

Provide your Azure DevOps access token. It is used as an alternate password to authenticate your Azure DevOps account. If you do not have one, create a Azure DevOps access token .

- Select this if you wish to store GitOps configuration in a web-based Git repository hosting service offered by Bitbucket.

- Select this if you wish to store GitOps configuration in a git repository hosted on a self-managed Bitbucket Data Center (on-prem).

A workspace in your Bitbucket account. Refer .

Figure 5: Entering Details of Bitbucket Cloud

Enter the Bitbucket workspace ID. If you do not have one, refer

Enter the Bitbucket project key. If you do not have one, refer . Note: If the project is not provided, the repository is automatically assigned to the oldest project in the workspace.

Provide your personal access token (PAT). It is used as an alternate password to authenticate your Bitbucket Cloud account. If you do not have one, create a Bitbucket Cloud PAT .

Figure 6: Entering Details of Bitbucket Data Center

Enter the Bitbucket project key. Refer .

Pick a for your organization. You have the option to select create free organization also.

For more information about the plans available for your team, see . You can also refer official doc page for more detail.

You can also refer official page for more details.

code - Grants the ability to read source code and metadata about commits, change sets, branches, and other version control artifacts. .

You can also refer for more details.

Deployment Template
Charts
add it to the specific application
GitOps Configuration
App Configuration
Devtron's Resource Browser
this link
plan
GitHub's products
GitHub organization
Azure DevOps - Project Creation
More information on scopes in Azure DevOps
official Bitbucket Workspace page
supported Git providers
GitHub
GitLab
Azure
Bitbucket
Creating Organization in GitHub
Creating Group in GitLab
Creating Project in Azure
Bitbucket Cloud
Bitbucket Data Center
Creating Workspace in Bitbucket
here
here
https://dev.azure.com/devtron-test
here
Bitbucket Project Key
here
Bitbucket Project Key
how to create organization in Github
GitLab Group ID
Azure DevOps Project Name
Bitbucket Workspace Id
supported Git providers