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 (1)
config:
  routing:
    defaultRoutingClass: basic
  workspace:
    backupCronJob:
      enable: true
      registry:
        path: default-route-openshift-image-registry.apps.{cluster ID}.openshiftapps.com
      oras:
        extraArgs: '--insecure' (2)
      schedule: '0 */4 * * *' # cron expression with backup frequency
    imagePullPolicy: Always
1 For Red Hat OpenShift, the default installation namespace for the DevWorkspace operator is openshift-operators. See the DevWorkspace operator overview.
2 The --insecure flag can be required depending on the integrated registry’s routing configuration.

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.

Note: If the installation namespace for the DevWorkspace operator is not openshift-operators, you must define it as an environment variable for the Eclipse Che dashboard in the CheCluster Custom Resource.

apiVersion: org.eclipse.che/v2
kind: CheCluster
spec:
  components:
    dashboard:
      deployment:
        containers:
          - env:
              - name: DWO_NAMESPACE
                value: $OPERATOR_INSTALL_NAMESPACE
            name: che-dashboard