devtron-backups

by Devtron

Helm chartv0.3.0App 2.1

A Helm chart for Devtron Backups

About this chart

Devtron Backup Chart

This chart contains configuration files for setting up backup for Devtron stack using different cloud storage providers and persistence options.

Introduction

Devtron Backup chart provides backup configurations for PostgreSQL databases and ArgoCD applications running in the Devtron environment. It supports backup to various cloud storage providers such as Azure Blob Storage, Google Cloud Storage (GCS), S3, as well as backup to persistent volume claims (PVC).

Configuration

The backup configurations are defined in the YAML file, which specifies settings such as schedule, storage options, and encryption. If you have the Gitops Module enabled in Devtron then it is advised to set argocd_backup.enabled=true to ensure that Argocd Backup is also available.

Global Settings

ParameterDescriptionDefault
global.scheduleCronCron schedule for backups"0 */12 * * *" (twice daily)
global.timezoneTimezone for the cron scheduleUTC
global.tolerationsPod tolerations for backup jobs[]
global.nodeSelectorNode selection constraints{}
global.argocdversionArgoCD versionv2
extraConfigPass any additional custom fields under jobTemplate.spec in the Kubernetes CronJob spec.{}

Azure Backup

Azure backup can be enabled by setting AZURE.enabled to true in the YAML file. Configure Azure storage account details and encryption settings as required.

Azure Blob Storage Configuration

ParameterDescriptionRequired
global.AZURE.enabledEnable Azure Blob Storage backupYes (set to true)
AZURE_BLOB_ACCOUNT_NAMEAzure storage account nameYes
AZURE_ACCOUNT_KEYAzure storage account keyYes
AZURE_BLOB_CONTAINER_FOR_POSTGRESContainer name for PostgreSQL backupsYes
AZURE_BLOB_CONTAINER_FOR_ARGOCDContainer name for ArgoCD backupsYes
encryption.enabledEnable backup encryptionNo (defaults to false)
encryption.passphrasePassphrase for encryption/decryptionYes (if encryption enabled)

GCP Backup

GCP backup can be enabled by setting GCP.enabled to true in the YAML file. Configure the GCS bucket name, and optionally, provide GCP credentials if the default service account lacks permissions.

ParameterDescriptionRequired
global.GCP.enabledEnable GCP storage backupYes (set to true)
GCS_BUCKET_NAMEGCS bucket name to store backupsYes
CREDENTIALS.enabledUse custom GCP credentialsNo (defaults to false)
GCP_CREDENTIALS_JSONBase64 encoded GCP service account credentials JSONYes (if CREDENTIALS.enabled: true)
encryption.enabledEnable backup encryptionNo (defaults to false)
encryption.passphrasePassphrase for encryption/decryptionYes (if encryption is enabled)

S3 Backup

S3 backup can be enabled by setting S3.enabled to true in the YAML file. Configure the S3 bucket details and encryption settings as required.

S3 Storage Configuration

ParameterDescriptionRequired
global.S3.enabledEnable S3 storage backupYes (set to true)
S3_BUCKET_NAMES3 bucket nameYes
S3_ACCESS_KEYS3 access keyYes (unless NODE_ROLE: true)
S3_SECRET_KEYS3 secret keyYes (unless NODE_ROLE: true)
AWS_REGIONAWS regionYes (for AWS S3)
S3_ENDPOINTCustom endpoint for non-AWS S3 servicesYes (for non-AWS services)
CA_BUNDLECustom CA bundle for S3 serviceNo
NODE_ROLEUse node's IAM role for S3 accessNo (defaults to true)
encryption.enabledEnable backup encryptionNo (defaults to false)
encryption.passphrasePassphrase for encryption/decryptionYes (if encryption enabled)

PVC Backup

PVC backup can be enabled by setting PERSISTENCE.enabled to true in the YAML file. Specify PVC settings, including storage class and size.

ParameterDescriptionRequired
global.PERSISTENCE.enabledEnable PVC backupYes (set to true)
existingClaimUse an existing PVC claimNo (required if size is not set)
sizeSize of the PVC to be createdYes (if existingClaim is not provided)
storageClassStorage class for the PVCYes (if existingClaim is not provided)
encryption.enabledEnable backup encryptionNo (defaults to false)
encryption.passphrasePassphrase for encryption/decryptionYes (if encryption is enabled)

Additionally, remember to enable postgress_backup or argocd_backup according to your requirements in the YAML file. If GitOps is enabled, ensure that argocd_backup is enabled."

Usage

Follow the steps below to use the backup chart:

  1. Modify the YAML file according to your backup requirements.
  2. Apply the configurations to your Kubernetes cluster.

Things to be considered while migrating from v0.1.x to v0.2.x:

Previously, in v0.1.x, support was available only for the following storage options:

  • AWS S3
  • Azure
  • GCP
  • PVC

In the updated version (v0.2.x), support for all types of storage options using the S3 protocol has been added, for example, AWS S3, MINIO, etc. As we have merged the options for AWS and generic S3 into one, we have to consider a few key changes:

  • AWS changed to S3
    • Previously, the configurations for AWS used to be set inside the AWS: option. Now it has changed to S3:, but only the naming has changed, not the functionality.
  • AWS_ACCESS_KEY changed to S3_ACCESS_KEY
    • This will continue to accept the ACCESS_KEY of the S3 storage, whether it be AWS S3 or any other storage options supporting the S3 protocol.
  • AWS_SECRET_KEY changed to S3_SECRET_KEY
    • This will continue to accept the SECRET_KEY of the S3 storage, whether it be AWS S3 or any other storage options supporting the S3 protocol.
  • S3_ENDPOINT
    • This option can be newly seen in the v0.2.x, which accepts the endpoint of the S3 storage service, for example, MINIO (Can be kept empty in the case of AWS S3 Bucket).

Deploy devtron-backups with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has devtron-backups on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdevtron-backups is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply