rhacs-backup

by tjungbauer

Helm chartv1.0.7Apache-2.0Verified publisher

Chart to create a CronJoc to backup Advanced Cluster Security for Kubernetes to a PerstistentVolume.

About this chart

rhacs-backup

Description

Chart to create a CronJoc to backup Advanced Cluster Security for Kubernetes to a PerstistentVolume.

This Helm Chart installs a CronJob that will periodically create a backup of Advanced Cluster Security. The following objects must be considered:

  1. CronJob
  2. ServiceAccount to run the CronJob
  3. PerstistentVolumeClaim to store the backup
  4. Optional PerstistentVolume - if you want to use a specific NFS share

Verify the official documentation: https://docs.openshift.com/acs/4.6/backup_and_restore/backing-up-acs.html

To authenticate against ACS a token with ADMIN permissions must be created. This token must be stored in a Kubernetes Secret called rox-backup with the keys:

  1. rox_token: Token that is created
  2. rox_endpoint: Endpoint of ACS (without https://, but with the port 443)

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
https://charts.stderr.at/tpl~1.0.27

It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/rhacs-backup

Parameters

Values

KeyTypeDefaultDescription
backup_storage_sizestring"100Gi"
cronjob.annotationsobject{}Custom annotations that shall be applied to the Cronjob Add required key-value pairs as needed
cronjob.imagestringregistry.redhat.io/openshift4/ose-cliImage to use for the CronJob
cronjob.namestringacs-backupName of the CronJob
cronjob.namespacestringstackroxNamespace of the CronJob
cronjob.nfs_mountpathstring"/acs-backup"mount point inside the cronjob pod
cronjob.retentionint30
cronjob.schedulestring"0 4 * * *"Schedule of the Cronjob, for example: daily at 4am
cronjob.syncwaveint5Syncwave for the CronJob
enabledboolfalseEnable ACS backup.
namestring"acs-backup"
namespacestring"stackrox"
pv.accessModestringReadWriteOnceAccess mode of the PV
pv.annotationsobject{}Custom annotations that shall be applied to the PV Add required key-value pairs as needed
pv.enabledboolfalseEnable PV creation?
pv.namestringacs-backupNmae of the PV
pv.pathstring"<path>"Path of the NFS share for example
pv.serverstring"<ip-address>"Server address of the NFS share for example
pv.sizestring100GiSize of the Storage
pv.storageClassstring""StorageClass must be provided as empty value here, since NFS mount is not provided as storageclass.
pv.syncwaveint2Syncwave for the PV
pvc.accessModestringReadWriteOnceusing RWO accessMode, which is usually sufficient
pvc.annotationsobject{}Custom annotations that shall be applied to the PVC Add required key-value pairs as needed
pvc.namestringacs-backupName of the PVC
pvc.setVolumeNameboolfalseSet the name of the PV, only required if the PV will be created (see below)
pvc.sizestring100GiSize of the Storage
pvc.storageClassstringN/AStorageClass must be provided as empty value here, since NFS mount is not provided as storageclass.
pvc.syncwaveint5Syncwave for the PVC
serviceAccount.createboolfalseCreate service account or not
serviceAccount.namestringdefaultServiceAccount to run the backup

Example

---
name: &bu_name acs-backup
backup_storage_size: &backup_storage_size "100Gi"

enabled: true
namespace: stackrox

serviceAccount:
  name: *bu_name
  create: true

# Settings for the CronJob
cronjob:
  name: *bu_name
  schedule: "0 4 * * *"
  retention: 30
  nfs_mountpath: /acs-backup

# Settings for the PVC
pvc:
  # -- Name of the PVC
  # @default -- acs-backup
  name: *bu_name

  # -- Size of the Storage
  # @default -- 100Gi
  size: *backup_storage_size

  # -- StorageClass must be provided as empty value here, since NFS mount is not provided as storageclass.
  # @default -- N/A
  storageClass: "gp3-csi"

Installing the Chart

To install the chart with the release name my-release:

helm install my-release tjungbauer/<chart-name>>

The command deploys the chart on the Kubernetes cluster in the default configuration.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.


Autogenerated from chart metadata using helm-docs v1.14.2

Deploy rhacs-backup with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rhacs-backup 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 chartrhacs-backup is pinned at v1.0.7 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