Installs components in Kubernetes with Helm, creates the following resources:

  • CronJob
  • ConfigMap (generated from flexible number of environment variables)
  • ServiceAccount (optional)
  • PersistentVolumeClaim (optional)
  • ExternalSecret (optional)

Make sure to create a secret for sensitive variables (like passwords and keys). Copy the default values.yaml somewhere, edit the new file accordingly, and proceed with installation. You can always use --set directive for helm upgrade or helm install commands to avoid storing values files in a repository.

NOTE: ExternalSecret resource is meant to be used with an already configured essential external secrets custom resource definitions (may be supplied by the External Secrets Operator) and ClusterSecretStore resource

NOTE: Helm release initial installation may fail if the selected StorageClass for the managed PersistentVolumeClaim with volumeBindingMode set to WaitForFirstConsumer until the first Pod launch by the cron schedule

Add Corewide Helm repository

Make the charts discoverable by adding the repository to your list:

 shellhelm repo add corewide https://solutions.corewide.com/helm/
Log in to Corewide registry

Once you have a Corewide Solutions Portal account, get your registry password here and use it to log in via CLI:

 shellhelm registry login oci.corewide.com
Configure chart values

Chart values (see the table below) can be passed one by one using --set argument or via a configuration file. You can create one based on the defaults using the following command:

 shellhelm show values corewide/file-backup > values.yaml
Install the chart from CLI

Install the chart after editing your values.yaml:

 shellhelm repo update
helm install file-backup corewide/file-backup --version 1.2.1 -f values.yaml
Install the chart with Terraform

Define Helm provider configuration in your project code, then:

 hclresource "helm_release" "file_backup" {
  name       = "file-backup"
  repository = "oci://oci.corewide.com/helm"
  chart      = "file-backup"
  version    = "1.2.1"

  # define your values as set blocks:
  set {
    ...
  }
}

File Backup

A Helm chart for file backups
Chart
80% off
$450
$90
TOTAL $570
Dependencies included: $480
BUY
v1.2.1 released 1 month, 2 weeks ago
New version approx. every 4 weeks

Installs components in Kubernetes with Helm, creates the following resources:

  • CronJob
  • ConfigMap (generated from flexible number of environment variables)
  • ServiceAccount (optional)
  • PersistentVolumeClaim (optional)
  • ExternalSecret (optional)

Make sure to create a secret for sensitive variables (like passwords and keys). Copy the default values.yaml somewhere, edit the new file accordingly, and proceed with installation. You can always use --set directive for helm upgrade or helm install commands to avoid storing values files in a repository.

NOTE: ExternalSecret resource is meant to be used with an already configured essential external secrets custom resource definitions (may be supplied by the External Secrets Operator) and ClusterSecretStore resource

NOTE: Helm release initial installation may fail if the selected StorageClass for the managed PersistentVolumeClaim with volumeBindingMode set to WaitForFirstConsumer until the first Pod launch by the cron schedule

Prepare a Kubernetes Secret with DO Spaces credentials:

 yaml# spaces-secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: spaces-access-keys
data:
  STORAGE_SECRET_ACCESS_KEY: <base64-encoded-storage-access-key>
  STORAGE_ACCESS_KEY_ID: <base64-encoded-storage-access-key-id>

Deploy it:

 bashkubectl create namespace backups
kubectl -n backups apply -f spaces-secret.yaml

Before you proceed, make sure your cluster can download the images from Corewide registry: create an imagePullSecret (referenced as corewide in the example below).

Define backup configuration in values.yaml and use it to install Helm release:

 yamlimagePullSecrets:
  - name: corewide

serviceAccount:
  enable: false

backupMode: "archive"
backupStorageType: "s3"
backupSourceDirectories:
  - "for_backup"
backupTargetDirectory: "backups"
backupRetentionPeriodDays: 7

env:
  STORAGE_BUCKET_NAME: backups
  STORAGE_ENDPOINT: fra1.digitaloceanspaces.com
  BACKUP_EXCLUDE_PATHS: file.txt,dir/some_other_file.py

secretNamesForEnvFrom:
  - spaces-secret

schedule: "0 1 * * *"
Parameter Type Description Default
image map A block that describes Docker image pod configuration
image.repository string Address of Docker image repository oci.corewide.com/docker/file-backup
image.tag string Tag of the Docker image. Defaults to Chart's appVersion
image.pullPolicy string Conditions for pulling new container images Always
imagePullSecrets list Reference to secret with access credentials of Docker image container registry (effective when ServiceAccount usage is disabled) []
podAnnotations map Annotations to attach to pods deployed by the chart {}
podLabels map Provide custom labels to created pod {}
securityContext map Security context parameters to pass to containers in pods deployed by the chart {}
resources map Container resource parameters to pass to application pods {}
nodeSelector map Node selector to attach to pods deployed by the chart {}
tolerations list(map) List of toleration policies to attach to pods deployed by the chart []
affinity map Set of node affinity parameters for pods deployed by the chart {}
successfulJobsHistoryLimit int How many completed jobs will be kept 7
failedJobsHistoryLimit int How many failed jobs will be kept 3
backupMode string Backup mode. Allowed values: sync (synchronizes source directory with backup target directory), archive (creates timestamped archives of every source directory and uploads them to backup target directory), full (uploads source directories' content to timestamped folders in backup target directory) archive
backupStorageType string Type of the object storage to use for storing backups. Use local to copy files to local filesystem s3
backupSourceDirectories list(string) List of paths (both relative and absolute) to backup. If backupMode is sync, must contain only one item. Paths containing spaces are not supported []
backupRetentionPeriodDays int Maximum allowed backup files' age in days. If not set, retention will be skipped and no backup files or folders will be deleted
env map Environment variables to pass to the containers of application pods {}
secretNamesForEnvFrom list(string) List of secrets to populate container environment with []
schedule string A schedule to run backup "0 0 * * *"
serviceAccount map A block that describes ServiceAccount configuration
serviceAccount.enable string Specifies whether a service account should be used true
serviceAccount.create string Specifies whether a service account should be created false
serviceAccount.annotations map Annotations to add to the service account {}
serviceAccount.name string The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template
persistence map A block that describes PersistenceVolumeClaim configuration
persistence.enable string Specifies whether PersistenceVolumeClaim should be created false
persistence.storageClassName string Specifies a storageClass name for persistent volume that will be created. If empty, the default one will be used
persistence.volumeSize int A persistent volume storage size, Gi 20
persistence.accessMode string Access mode of the attached volume ReadWriteOnce
externalSecret map A block that describes ExternalSecret settings configuration. Requires External Secret Operator and its CRDs to be pre-installed
externalSecret.clusterSecretStoreName string Name of Kubernetes ClusterSecretStore resource to be used in creation of ExternalSecret resources ""
externalSecret.refreshInterval string Amount of time before the values reading again from the SecretStore provider 1h
externalSecret.secretNames list(string) List of Secrets Manager's secret names to fetch the data from []
volumeMounts list(map) List of volumes definitions to mount in the main container []
volumeMounts[*].name string Name of the existing PersistenceVolumeClaim to mount as a volume
volumeMounts[*].mountPath string Path inside container where volume will be mounted

Not sure where to start?
Let's find your perfect match.