Configuring backup with the integrated OpenShift container registry

This option is available only on OpenShift clusters with integrated container registry enabled and requires no additional configuration.

To enable the backup use following configuration in the global DWOC:

apiVersion: controller.devfile.io/v1alpha1
kind: DevWorkspaceOperatorConfig
metadata:
  name: devworkspace-operator-config
  namespace: $OPERATOR_INSTALL_NAMESPACE
config:
  routing:
    defaultRoutingClass: basic
  workspace:
    backupCronJob:
      enable: true
      registry:
        path: default-route-openshift-image-registry.apps.{cluster ID}.openshiftapps.com
      schedule: '0 */4 * * *' # cron expression with backup frequency
    imagePullPolicy: Always

Note: The path field must contain the URL to your OpenShift integrated registry given by the cluster.

To get a default path to registry run following command:

echo "https://$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}'))"

Once the backup job is finished, the backup archives will be available in the DevWorkspace namespace under a repository with a matching DevWorkspace name.