Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DEFAULT_VERSION := 99.0.0
VERSION ?= $(DEFAULT_VERSION) # the version of the operator
OPERATOR_SDK_VERSION ?= v1.35.0
ENVTEST_K8S_VERSION = 1.32 #refers to the version of kubebuilder assets to be downloaded by envtest binary # Kubernetes version from OpenShift 4.19.x
GOLANGCI_LINT_VERSION ?= v2.1.2
GOLANGCI_LINT_VERSION ?= v2.6.1
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.16.5
OPM_VERSION ?= v1.23.0
Expand Down Expand Up @@ -47,7 +47,7 @@ IMAGE_TAG_BASE ?= openshift.io/oadp-operator
BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)

# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command
BUNDLE_GEN_FLAGS ?= -q --extra-service-accounts "velero,non-admin-controller" --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
BUNDLE_GEN_FLAGS ?= -q --extra-service-accounts "velero,non-admin-controller,oadp-vm-file-restore-controller-manager" --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)

# USE_IMAGE_DIGESTS defines if images are resolved via tags or digests
# You can enable this value if you would like to use SHA Based Digests
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Documentation in this repository are considered unofficial and for development p
5. [Use NooBaa as a Backup Storage Location](docs/config/noobaa/install_oadp_noobaa.md)
6. [Use Velero --features flag](docs/config/features_flag.md)
7. [Use Custom Plugin Images for Velero ](docs/config/custom_plugin_images.md)
8. [Enable VM File Restore](docs/config/vm_file_restore.md)
5. Examples
1. [Sample Apps used in OADP CI](https://github.com/openshift/oadp-operator/tree/oadp-dev/tests/e2e/sample-applications)
2. [Stateless App Backup/Restore](docs/examples/stateless.md)
Expand Down
23 changes: 23 additions & 0 deletions api/v1alpha1/dataprotectionapplication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ const GCPPluginImageKey UnsupportedImageKey = "gcpPluginImageFqin"
const KubeVirtPluginImageKey UnsupportedImageKey = "kubevirtPluginImageFqin"
const HypershiftPluginImageKey UnsupportedImageKey = "hypershiftPluginImageFqin"
const NonAdminControllerImageKey UnsupportedImageKey = "nonAdminControllerImageFqin"
const VMFileRestoreControllerImageKey UnsupportedImageKey = "vmFileRestoreControllerImageFqin"
const VMFileRestoreAccessImageKey UnsupportedImageKey = "vmFileRestoreAccessImageFqin"
const VMFileRestoreSSHImageKey UnsupportedImageKey = "vmFileRestoreSSHImageFqin"
const VMFileRestoreBrowserImageKey UnsupportedImageKey = "vmFileRestoreBrowserImageFqin"
const OperatorTypeKey UnsupportedImageKey = "operator-type"

const OperatorTypeMTC = "mtc"
Expand Down Expand Up @@ -728,6 +732,18 @@ type NonAdmin struct {
BackupSyncPeriod *metav1.Duration `json:"backupSyncPeriod,omitempty"`
}

// VMFileRestore defines VM file restore feature configuration
type VMFileRestore struct {
// Enable flag to deploy VM file restore controller
// By default is disabled
// +optional
Enable *bool `json:"enable,omitempty"`

// Resource requirements for the VM file restore controller
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}

// DataMover defines the various config for DPA data mover
type DataMover struct {
// enable flag is used to specify whether you want to deploy the volume snapshot mover controller
Expand Down Expand Up @@ -840,6 +856,10 @@ type DataProtectionApplicationSpec struct {
// - kubevirtPluginImageFqin
// - hypershiftPluginImageFqin
// - nonAdminControllerImageFqin
// - vmFileRestoreControllerImageFqin
// - vmFileRestoreAccessImageFqin
// - vmFileRestoreSSHImageFqin
// - vmFileRestoreBrowserImageFqin
// - operator-type
// - tech-preview-ack
// +optional
Expand Down Expand Up @@ -873,6 +893,9 @@ type DataProtectionApplicationSpec struct {
// nonAdmin defines the configuration for the DPA to enable backup and restore operations for non-admin users
// +optional
NonAdmin *NonAdmin `json:"nonAdmin,omitempty"`
// vmFileRestore defines the configuration for the DPA to enable VM file restore feature
// +optional
VMFileRestore *VMFileRestore `json:"vmFileRestore,omitempty"`
// The format for log output. Valid values are text, json. (default text)
// +kubebuilder:validation:Enum=text;json
// +kubebuilder:default=text
Expand Down
30 changes: 30 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

165 changes: 165 additions & 0 deletions bundle/manifests/oadp-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,12 @@ spec:
displayName: Plugins
path: plugins
version: v1
- kind: VirtualMachineBackupsDiscovery
name: virtualmachinebackupsdiscoveries.oadp.openshift.io
version: v1alpha1
- kind: VirtualMachineFileRestore
name: virtualmachinefilerestores.oadp.openshift.io
version: v1alpha1
- description: VolumeSnapshotLocation is a location where Velero stores volume
snapshots.
displayName: VolumeSnapshotLocation
Expand Down Expand Up @@ -835,6 +841,149 @@ spec:
verbs:
- get
serviceAccountName: non-admin-controller
- rules:
- apiGroups:
- ""
resources:
- events
- namespaces
- pods
- secrets
- serviceaccounts
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- oadp.openshift.io
resources:
- virtualmachinebackupsdiscoveries
- virtualmachinefilerestores
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- oadp.openshift.io
resources:
- virtualmachinebackupsdiscoveries/finalizers
- virtualmachinefilerestores/finalizers
verbs:
- update
- apiGroups:
- oadp.openshift.io
resources:
- virtualmachinebackupsdiscoveries/status
- virtualmachinefilerestores/status
verbs:
- get
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- velero.io
resources:
- backups
verbs:
- get
- list
- watch
- apiGroups:
- velero.io
resources:
- datadownloads
verbs:
- get
- list
- patch
- watch
- apiGroups:
- velero.io
resources:
- downloadrequests
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- velero.io
resources:
- restores
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
serviceAccountName: oadp-vm-file-restore-controller-manager
- rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -1135,6 +1284,14 @@ spec:
value: registry.redhat.io/oadp/oadp-mustgather-rhel8:v1.2
- name: RELATED_IMAGE_NON_ADMIN_CONTROLLER
value: quay.io/konveyor/oadp-non-admin:latest
- name: RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER
value: quay.io/konveyor/oadp-vm-file-restore:latest
- name: RELATED_IMAGE_VM_FILE_RESTORE_ACCESS
value: quay.io/konveyor/oadp-vmfr-access:latest
- name: RELATED_IMAGE_VM_FILE_RESTORE_SSH
value: quay.io/konveyor/oadp-vmfr-access-sshd:latest
- name: RELATED_IMAGE_VM_FILE_RESTORE_BROWSER
value: quay.io/konveyor/oadp-vmfr-access-filebrowser:latest
image: quay.io/konveyor/oadp-operator:latest
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -1297,4 +1454,12 @@ spec:
name: mustgather
- image: quay.io/konveyor/oadp-non-admin:latest
name: non-admin-controller
- image: quay.io/konveyor/oadp-vm-file-restore:latest
name: vm-file-restore-controller
- image: quay.io/konveyor/oadp-vmfr-access:latest
name: vm-file-restore-access
- image: quay.io/konveyor/oadp-vmfr-access-sshd:latest
name: vm-file-restore-ssh
- image: quay.io/konveyor/oadp-vmfr-access-filebrowser:latest
name: vm-file-restore-browser
version: 99.0.0
72 changes: 72 additions & 0 deletions bundle/manifests/oadp.openshift.io_dataprotectionapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2669,9 +2669,81 @@ spec:
- kubevirtPluginImageFqin
- hypershiftPluginImageFqin
- nonAdminControllerImageFqin
- vmFileRestoreControllerImageFqin
- vmFileRestoreAccessImageFqin
- vmFileRestoreSSHImageFqin
- vmFileRestoreBrowserImageFqin
- operator-type
- tech-preview-ack
type: object
vmFileRestore:
description: vmFileRestore defines the configuration for the DPA to enable VM file restore feature
properties:
enable:
description: |-
Enable flag to deploy VM file restore controller
By default is disabled
type: boolean
resources:
description: Resource requirements for the VM file restore controller
properties:
claims:
description: |-
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: |-
Name must match the name of one entry in pod.spec.resourceClaims of
the Pod where this field is used. It makes that resource available
inside a container.
type: string
request:
description: |-
Request is the name chosen for a request in the referenced claim.
If empty, everything from the claim is made available, otherwise
only the result of this request.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Requests describes the minimum amount of compute resources required.
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests cannot exceed Limits.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
type: object
type: object
required:
- configuration
type: object
Expand Down
Loading