message: only a single instance of Non-Admin Controller can be installed across the entire cluster. Non-Admin controller is already configured and installed in openshift-adp namespace.
As a cluster administrator, you can use the Self-service feature in the following scenarios:
Enable or disable OADP Self-service.
Approve or reject the NABSL custom resource (CR).
Enforce template policies in the DataProtectionApplication
(DPA) CR.
You must be a cluster administrator to enable the OADP Self-service feature. You can use the spec.nonAdmin.enable
section of the DataProtectionApplication
(DPA) custom resource (CR) to enable and disable the Self-service feature.
Enabling the Self-service feature installs the NonAdminController
(NAC) CR in the OADP Operator namespace.
You can install only one instance of the Example error
|
You are logged in to the cluster with the cluster-admin
role.
You have installed the OADP Operator.
You have configured the DPA.
To enable OADP Self-service, edit the DPA CR to configure the nonAdmin.enable
section. See the following example configuration:
DataProtectionApplication
CRapiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: oadp-backup
namespace: openshift-adp
spec:
configuration:
nodeAgent:
enable: true
uploaderType: kopia
velero:
defaultPlugins:
- aws
- openshift
- csi
defaultSnapshotMoveData: true
nonAdmin: (1)
enable: true (2)
backupLocations:
- velero:
config:
profile: "default"
region: noobaa
s3Url: https://s3.openshift-storage.svc
s3ForcePathStyle: "true"
insecureSkipTLSVerify: "true"
provider: aws
default: true
credential:
key: cloud
name: <cloud_credentials>
objectStorage:
bucket: <bucket_name>
prefix: oadp
1 | Add the nonAdmin.enable section in the spec section of the DPA. |
2 | Set the enable field to true . To disable the Self-service feature, set the enable field to false . |
To verify that the NonAdminController
(NAC) pod is running in the OADP namespace, run the following command:
$ oc get pod -n openshift-adp -l control-plane=non-admin-controller
NAME READY STATUS RESTARTS AGE
non-admin-controller-5d....f5-p..9p 1/1 Running 0 99m
The NonAdminBackupStorageLocation
(NABSL) custom resource (CR) administrator approval workflow is an opt-in feature. As a cluster administrator, you must explicitly enable the feature in the DataProtectionApplication
(DPA) CR by setting the nonAdmin.requireApprovalForBSL
field to true
.
You also need to set the noDefaultBackupLocation
field in the DPA CR to true
. This setting indicates that, there is no default backup storage location configured in the DPA CR and the namespace admin user can create a NABSL CR and send the CR request for approval.
You are logged in to the cluster with the cluster-admin
role.
You have installed the OADP Operator.
You have enabled OADP Self-service in the DataProtectionApplication
CR.
To enable the NABSL administrator approval workflow, edit the DPA CR by using the following example configuration:
DataProtectionApplication
CRapiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: oadp-backup
namespace: openshift-adp
spec:
configuration:
nodeAgent:
enable: true
uploaderType: kopia
velero:
defaultPlugins:
- aws
- openshift
- csi
noDefaultBackupLocation: true (1)
nonAdmin:
enable: true
requireApprovalForBSL: true (2)
1 | Add the noDefaultBackupLocation field and set it to true . |
2 | Add the requireApprovalForBSL field and set it to true . |
As a cluster administrator, to approve a NonAdminBackupStorageLocation
(NABSL) CR request, you can edit the NonAdminBackupStorageLocationRequest
CR and set the approvalDecision
field to approve
.
You are logged in to the cluster with the cluster-admin
role.
You have installed the OADP Operator.
You have enabled OADP Self-service in the DataProtectionApplication
(DPA) CR.
You have enabled the NABSL CR approval workflow in the DPA.
To see the NABSL CR requests that are in queue for administrator approval, run the following command:
$ oc -n openshift-adp get NonAdminBackupStorageLocationRequests
NAME REQUEST-PHASE REQUEST-NAMESPACE REQUEST-NAME AGE
non-admin-bsl-test-.....175 Approved non-admin-bsl-test incorrect-bucket-nabsl 4m57s
non-admin-bsl-test-.....196 Approved non-admin-bsl-test perfect-nabsl 5m26s
non-admin-bsl-test-s....e1a Rejected non-admin-bsl-test suspicious-sample 2m56s
non-admin-bsl-test-.....5e0 Pending non-admin-bsl-test waitingapproval-nabsl 4m20s
To approve the NABSL CR request, set the approvalDecision
field to approve
by running the following command:
$ oc patch nabslrequest <nabsl_name> -n openshift-adp --type=merge -p '{"spec": {"approvalDecision": "approve"}}' (1)
1 | Specify the name of the NonAdminBackupStorageLocationRequest CR. |
Verify that the Velero backup storage location is created and the phase is Available
by running the following command:
$ oc get velero.io.backupstoragelocation
NAME PHASE LAST VALIDATED AGE DEFAULT
test-nac-test-bsl-cd...930 Available 62s 62s
As a cluster administrator, to reject a NonAdminBackupStorageLocation
(NABSL) custom resource (CR) request, you can edit the NonAdminBackupStorageLocationRequest
CR and set the approvalDecision
field to reject
.
You are logged in to the cluster with the cluster-admin
role.
You have installed the OADP Operator.
You have enabled OADP Self-service in the DataProtectionApplication
(DPA) CR.
You have enabled the NABSL CR approval workflow in the DPA.
To see the NABSL CR requests that are in queue for administrator approval, run the following command:
$ oc -n openshift-adp get NonAdminBackupStorageLocationRequests
$ oc get nabslrequest
NAME REQUEST-PHASE REQUEST-NAMESPACE REQUEST-NAME AGE
non-admin-bsl-test-.....175 Approved non-admin-bsl-test incorrect-bucket-nabsl 4m57s
non-admin-bsl-test-.....196 Approved non-admin-bsl-test perfect-nabsl 5m26s
non-admin-bsl-test-s....e1a Rejected non-admin-bsl-test suspicious-sample 2m56s
non-admin-bsl-test-.....5e0 Pending non-admin-bsl-test waitingapproval-nabsl 4m20s
To reject the NABSL CR request, set the approvalDecision
field to reject
by running the following command:
$ oc patch nabslrequest <nabsl_name> -n openshift-adp --type=merge -p '{"spec": {"approvalDecision": "reject"}}' (1)
1 | Specify the name of the NonAdminBackupStorageLocationRequest CR. |
As a cluster administrator, you can enforce policies in the DataProtectionApplication
(DPA) spec template. The spec enforcement applies to Self-service custom resources (CRs) such as NonAdminBackup
, NonAdminRestore
, and NonAdminBackupStorageLocation
.
The cluster administrator can enforce a company, or a compliance policy by using the following fields in the DataProtectionApplication
(DPA) CR:
enforceBSLSpec
To enforce a policy on the NonAdminBackupStorageLocation
CR.
enforceBackupSpec
To enforce a policy on the NonAdminBackup
CR.
enforceRestoreSpec
To enforce a policy on the NonAdminRestore
CR.
By using the enforceable fields, administrators can ensure that the NABSL, NAB, and NAR CRs created by a namespace admin user, comply with the administrator defined policy.
As a cluster administrator, you can enforce the following fields for a NonAdminBackupStorageLocation
(NABSL) custom resource (CR):
objectStorage
credential
config
accessMode
validationFrequency
For example, if you want to enforce a namespace admin user to use a specific storage bucket, you can set up the DataProtectionApplication
(DPA) CR as following:
DataProtectionApplication
CRapiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
...
spec:
nonAdmin:
enable: true
enforceBSLSpec: (1)
config: (2)
checksumAlgorithm: ""
profile: default
region: us-west-2
objectStorage: (3)
bucket: my-company-bucket
prefix: velero
provider: aws
1 | Add the enforceBSLSpec section. |
2 | Enforce the config section of a NABSL to use an AWS S3 bucket in the us-west-2 region. |
3 | Enforce the objectStorage section of a NABSL to use a company bucket named my-company-bucket . |
When a namespace admin user creates a NABSL, they must follow the template set up in the DPA. Otherwise, the status.phase
field on the NABSL CR is set to BackingOff
and the NABSL fails to create.
As a cluster administrator, you can enforce the following fields for a NonAdminBackup
(NAB) CR:
csiSnapshotTimeout
itemOperationTimeout
resourcePolicy
includedResources
excludedResources
orderedResources
includeClusterResources
excludedClusterScopedResources
excludedNamespaceScopedResources
includedNamespaceScopedResources
labelSelector
orLabelSelectors
snapshotVolumes
ttl
snapshotMoveData
uploaderConfig.parallelFilesUpload
If you want to enforce a ttl
value and a Data Mover backup for a namespace admin user, you can set up the DataProtectionApplication
(DPA) CR as shown in the following example:
DataProtectionApplication
CRapiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
...
spec:
nonAdmin:
enable: true
enforceBackupSpec: (1)
snapshotMoveData: true (2)
ttl: 158h0m0s (3)
1 | Add the enforceBackupSpec section. |
2 | Enforce Data Mover by setting the snapshotMoveData field to true . |
3 | Enforce the ttl value by setting the field to 158h0m0s . |
When a namespace admin user creates a NAB CR, they must follow the template set up in the DPA. Otherwise, the status.phase
field on the NAB CR is set to BackingOff
and the NAB CR fails to create.
As a cluster administrator, you can enforce the following fields for a NonAdminRestore
(NAR) custom resource (CR):
itemOperationTimeout
uploaderConfig
includedResources
excludedResources
restoreStatus
includeClusterResources
labelSelector
orLabelSelectors
restorePVs
preserveNodePorts