MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / IsWorkspaceRestoreRequested

Function IsWorkspaceRestoreRequested

pkg/library/restore/restore.go:49–55  ·  view source on GitHub ↗
(workspace *dw.DevWorkspaceTemplateSpec)

Source from the content-addressed store, hash-verified

47}
48
49func IsWorkspaceRestoreRequested(workspace *dw.DevWorkspaceTemplateSpec) bool {
50 if !workspace.Attributes.Exists(constants.WorkspaceRestoreAttribute) {
51 return false
52 }
53 return workspace.Attributes.GetBoolean(constants.WorkspaceRestoreAttribute, nil)
54
55}
56
57// GetWorkspaceRestoreInitContainer creates an init container that restores workspace data from a backup image.
58// The restore container uses the existing workspace-recovery.sh script to extract backup content.

Callers 1

ReconcileMethod · 0.92

Calls 2

ExistsMethod · 0.80
GetBooleanMethod · 0.80

Tested by

no test coverage detected