Skip to content

Commit e672e74

Browse files
committed
nabsl workflow
Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
1 parent 201606f commit e672e74

8 files changed

+113
-38
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
:_mod-docs-content-type: ASSEMBLY
2-
[id="oadp-self-service-use-cases"]
2+
[id="oadp-self-service-non-admin-use-cases"]
33
= {oadp-short} Self-Service non-admin use cases
44
include::_attributes/common-attributes.adoc[]
55
:context: oadp-self-service-non-admin-use-cases
66

77
toc::[]
88

9-
Following are the non-admin uses cases for using {oadp-short} Self-Service to back up and restore applications. The use cases cover:
9+
Following are a few non-admin uses cases for using {oadp-short} Self-Service to back up and restore applications. The use cases cover:
1010

1111
* Non-admin filesystem backup and restore by using Kopia.
1212
* Non-admin Data Mover backup and restore.
1313
* Non-admin Container Storage Interface (CSI) backup and restore.
14+
* Creating a `NonAdminBackupStorageLocation` CR.
1415
1516
include::modules/oadp-self-service-use-case-kopia.adoc[leveloffset=+1]
1617

1718
include::modules/oadp-self-service-use-case-datamover.adoc[leveloffset=+1]
1819

1920
include::modules/oadp-self-service-use-case-csi.adoc[leveloffset=+1]
2021

21-
include::modules/oadp-self-service-creating-nabsl.adoc[leveloffset=+1]
22+
include::modules/oadp-self-service-backup-using-nabsl.adoc[leveloffset=+1]

modules/oadp-self-service-admin-spec-enforcement.adoc

-10
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@
88

99
As a cluster administrator, you can also enforce policies in the `DataProtectionApplication` (DPA) spec template. The spec enforcement applies to Self-Service CRs such as the `NonAdminBackup`, `NonAdminRestore`, and `NonAdminBackupStorageLocation`.
1010

11-
To ensure secure backup and restore, {oadp-short} Self-Service automatically excludes the following resources from being backed up or restored:
12-
13-
* Security Context Constraints (SCCs)
14-
* Cluster roles
15-
* Cluster role bindings
16-
* Custom resource definitions (CRDs)
17-
* `PriorityClasses`
18-
* Virtual machine cluster instance types
19-
* Virtual machine cluster preferences
20-
2111
The cluster administrator can enforce a company, or a compliance policy by using the following fields in the `DataProtectionApplication` (DPA) CR:
2212

2313
* `enforceBSLSpec` to enforce a policy on the `NonAdminBackupStorageLocation` CR .

modules/oadp-self-service-creating-nabsl.adoc renamed to modules/oadp-self-service-backup-using-nabsl.adoc

+81-12
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,36 @@
33
// backup_and_restore/application_backup_and_restore/oadp-self-service/oadp-self-service-non-admin-use-cases.adoc
44

55
:_mod-docs-content-type: PROCEDURE
6-
[id="oadp-self-service-creating-nabsl_{context}"]
7-
= Creating a `NonAdminBackupStorageLocation` CR
6+
[id="oadp-self-service-backup-using-nabsl_{context}"]
7+
= Using a `NonAdminBackupStorageLocation` CR for a non-admin Data Mover backup
88

9-
A non-admin user can create a `NonAdminBackupStorageLocation` CR in their authorized namespace.
9+
In this use case, you:
1010

11-
If the cluster administrator has enabled the `requireApprovalForBSL` field on the DPA, then the NABSL CR remains in the `Pending` state until the administrator approves the NABSL creation request.
11+
* Create a `NonAdminBackupStorageLocation` (NABSL) CR in your authorized namespace.
12+
** The NABSL CR request goes to the cluster administrator for approval.
13+
** The cluster administrator approves the request.
14+
* Create a `NonAdminBackup` (NAB) configuration file and set the NABSL as the backup storage location.
15+
* Apply the NAB configuration file to take a Data Mover backup of your application.
1216
1317
.Prerequisites
1418

1519
* You are logged in to the cluster as a non-admin user.
1620
* The cluster administrator has installed the {oadp-short} Operator.
1721
* The cluster administrator has configured the `DataProtectionApplication` to enable {oadp-short} Self-Service.
22+
* The cluster administrator has enabled the NABSL approval workflow. For more details, see "Enabling `NonAdminBackupStorageLocation` administrator approval workflow".
1823
* The cluster administrator has created a namespace for you and has authorized you to operate from that namespace.
24+
* You have installed an application in your authorized namespace.
1925
2026
.Procedure
2127

28+
. Create a `Secret` CR named `cloud-credentials` by using the cloud credentials file content for your cloud provider. Run the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ oc create secret generic cloud-credentials -n test-nac-ns --from-file cloud=<cloud_credentials_file> # <1>
33+
----
34+
1. Specify the cloud credentials file name. Also, note that the namespace in this example is `test-nac-ns`, which is your authorized namespace.
35+
2236
. To create a `NonAdminBackupStorageLocation` CR, create a YAML manifest file with the following configuration:
2337
+
2438
.Example `NonAdminBackupStorageLocation`
@@ -55,13 +69,6 @@ $ oc apply -f <nabsl_cr_filename> # <1>
5569
----
5670
1. Specify the file name containing the NABSL CR configuration.
5771
58-
.Verification
59-
60-
[IMPORTANT]
61-
====
62-
The NABSL is created only after the cluster administrator approves the NABSL CR request.
63-
====
64-
6572
. To verify that the NABSL CR is in the `New` phase and is pending administrator approval, run the following command:
6673
+
6774
[source,terminal]
@@ -97,7 +104,7 @@ status:
97104
1. The `status.conditions.message` field has the message `NonAdminBackupStorageLocationRequest approval pending`.
98105
2. The `status.phase` is `New`.
99106
100-
. To verify that the NABSL CR is successfully created, run the following command:
107+
. After the cluster administrator approves the `NonAdminBackupStorageLocationRequest` CR request, verify that the NABSL CR is successfully created by running the following command:
101108
+
102109
[source,terminal]
103110
----
@@ -164,3 +171,65 @@ status:
164171
5. This is the name of the associated `Velero` backup storage location object.
165172
6. The `phase` is `Available`. This indicates that the NABSL is ready for use.
166173
174+
. To use the NABL you created in your namespace for a Data Mover backup of your application, configure a YAML manifest file as shown in the following example:
175+
+
176+
.Example `NonAdminBackup`
177+
[source,yaml]
178+
----
179+
apiVersion: oadp.openshift.io/v1alpha1
180+
kind: NonAdminBackup
181+
metadata:
182+
name: test-nab
183+
spec:
184+
backupSpec:
185+
includedNamespaces:
186+
- "test-nac" # <1>
187+
snapshotMoveData: true # <2>
188+
storageLocation: test-nabsl # <3>
189+
----
190+
1. Specify the name of your authorized namespace in which your application is running. In this example, the namespace is `test-nac`.
191+
2. Set the `snapshotMoveData` field to `true` to enable Data Mover backup.
192+
3. Set the `storageLocation` field to the NABSL CR. In this example, the name of the NABSL CR is `test-nabsl`.
193+
194+
. Create the NAB CR by running the following command:
195+
+
196+
[source,terminal]
197+
----
198+
$ oc apply -f <nab_cr_filename> # <1>
199+
----
200+
1. Specify the YAML file name containing the NAB CR configuration.
201+
202+
. Verify that the backup is successfully created by running the following command:
203+
+
204+
[source,terminal]
205+
----
206+
$ oc get nab test-nab -o yaml
207+
----
208+
+
209+
.Example output
210+
[source,yaml]
211+
----
212+
apiVersion: oadp.openshift.io/v1alpha1
213+
kind: NonAdminBackup
214+
....
215+
status:
216+
...
217+
veleroBackup:
218+
nacuuid: test-nac-test-nab-b00...8-67c9797295c1
219+
name: test-nac-test-nab-b0...7c9797295c1
220+
namespace: openshift-adp
221+
status:
222+
backupItemOperationsAttempted: 2
223+
backupItemOperationsCompleted: 2
224+
completionTimestamp: "2025-02-17T13:57:20Z"
225+
expiration: "2025-03-19T13:55:30Z"
226+
formatVersion: 1.1.0
227+
hookStatus: {}
228+
phase: Completed # <1>
229+
progress:
230+
itemsBackedUp: 54
231+
totalItems: 54
232+
startTimestamp: "2025-02-17T13:55:30Z"
233+
version: 1
234+
----
235+
1. The phase is now `Completed`.

modules/oadp-self-service-enabling-nabsl-approval.adoc

+8-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
The `NonAdminBackupStorageLocation` (NABSL) administrator approval workflow is an opt-in feature. As a cluster administrator, you must explicitly enable the feature in the DPA by setting the `nonAdmin.requireApprovalForBSL` field to `true`.
1010

11+
You also need to set the `noDefaultBackupLocation` field in the DPA to `true`. This setting indicates that, there is no default backup storage location configured in the DPA and the non-admin user can create a NABSL CR and send the CR request for approval.
12+
1113
.Prerequisites
1214

1315
* You are logged in to the cluster with administrator privileges.
@@ -17,8 +19,8 @@ The `NonAdminBackupStorageLocation` (NABSL) administrator approval workflow is a
1719
.Procedure
1820

1921
* To enable the NABSL administrator approval workflow, edit the DPA and:
20-
.. Add the `requireApprovalForBSL` field as shown in the example.
21-
.. Set the `requireApprovalForBSL` field to `true`.
22+
.. Add the `noDefaultBackupLocation` field and set it to `true` as shown in the example.
23+
.. Add the `requireApprovalForBSL` field and set it to `true` as shown in the example.
2224
+
2325
.Example `DataProtectionApplication`
2426
[source,yaml]
@@ -38,9 +40,10 @@ spec:
3840
- aws
3941
- openshift
4042
- csi
41-
defaultSnapshotMoveData: true
43+
noDefaultBackupLocation: true # <1>
4244
nonAdmin:
4345
enable: true
44-
requireApprovalForBSL: true # <1>
46+
requireApprovalForBSL: true # <2>
4547
----
46-
1. Add the `requireApprovalForBSL` field and set it to `true`.
48+
1. Add the `noDefaultBackupLocation` field and set it to `true`.
49+
2. Add the `requireApprovalForBSL` field and set it to `true`.

modules/oadp-self-service-unsupported-features.adoc

+14-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99
The following features are not supported by {oadp-short} Self-Service:
1010

1111
* Cross cluster backup and restore, or migrations are not supported. These {oadp-short} operations are supported for the cluster administrator.
12+
1213
* A non-admin user cannot create a `VolumeSnapshotLocation` (VSL) CR. The cluster administrator creates and configures the VSL in the `DataProtectionApplication` (DPA) for a non-admin user.
14+
1315
* `ResourceModifiers` and volume policies are not supported for a non-admin user.
14-
* A non-admin user cannot request backup and restore logs by using the `NonAdminDownloadRequest` CR for a `BackupStorageLocation` created by the cluster administrator. A non-admin user must create a `NonAdminBackupStorageLocation` in their authorized namespace to access the backup and restore logs.
16+
17+
* A non-admin user cannot request backup and restore logs by using the `NonAdminDownloadRequest` CR for a `BackupStorageLocation` created by the cluster administrator. A non-admin user must create a `NonAdminBackupStorageLocation` in their authorized namespace to access the backup and restore logs.
18+
19+
* To ensure secure backup and restore, Self-Service automatically excludes the following resources from being backed up or restored:
20+
21+
** Security Context Constraints (SCCs)
22+
** Cluster roles
23+
** Cluster role bindings
24+
** Custom resource definitions (CRDs)
25+
** `PriorityClasses`
26+
** Virtual machine cluster instance types
27+
** Virtual machine cluster preferences

modules/oadp-self-service-use-case-csi.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ status:
151151
$ oc get pod -n test-nac # <1>
152152
----
153153
1. `test-nac` is your authorized namespace.
154-
154+
+
155155
.Example output
156156
157157
[source,terminal]
@@ -182,7 +182,7 @@ $ oc apply -f <nar_cr_filename> # <1>
182182
----
183183
1. Specify the YAML file name containing the NAR CR configuration.
184184
185-
. Verify that the NAR CR is in the `created` phase and eventually, the `completed` phase by running the following command:
185+
. Verify that the NAR CR is in the `created` phase, and eventually, the `completed` phase by running the following command:
186186
+
187187
[source,terminal]
188188
----

modules/oadp-self-service-use-case-datamover.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ status:
147147
$ oc get pod -n test-nac # <1>
148148
----
149149
1. `test-nac` is your authorized namespace.
150-
150+
+
151151
.Example output
152152
153153
[source,terminal]
@@ -178,7 +178,7 @@ $ oc apply -f <nar_cr_filename> # <1>
178178
----
179179
1. Specify the YAML file name containing the NAR CR configuration.
180180
181-
. Verify that the NAR CR is in the `created` phase and eventually, the `completed` phase by running the following command:
181+
. Verify that the NAR CR is in the `created` phase, and eventually, the `completed` phase by running the following command:
182182
+
183183
[source,terminal]
184184
----

modules/oadp-self-service-use-case-kopia.adoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,11 @@ $ oc get pod -n test-nac # <1>
139139
1. `test-nac` is your authorized namespace.
140140
+
141141
.Example output
142-
143142
[source,terminal]
144143
----
145144
No resources found in test-nac namespace.
146145
----
147-
+
146+
148147
. To create a `NonAdminRestore` (NAR) CR, configure a YAML manifest file as shown in the following example:
149148
+
150149
.Example `NonAdminRestore`
@@ -168,7 +167,7 @@ $ oc apply -f <nar_cr_filename> # <1>
168167
----
169168
1. Specify the YAML file name containing the NAR CR configuration.
170169
171-
. Verify that the NAR CR is in the `created` phase and eventually, the `completed` phase by running the following command:
170+
. Verify that the NAR CR is in the `created` phase, and eventually, the `completed` phase by running the following command:
172171
+
173172
[source,terminal]
174173
----

0 commit comments

Comments
 (0)