Configure backup with the integrated Kubernetes registry
Configure the DevWorkspace backup to use the integrated Kubernetes container registry, available on clusters with the integrated container registry enabled. This option requires no additional credentials configuration.
-
An active
kubectlsession with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl. -
The integrated container registry is enabled on the cluster.
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.
|
If the installation namespace for the DevWorkspace operator is not
|