Skip to content

OADP-4001 Self-Service #89043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shdeshpa07
Copy link
Contributor

@shdeshpa07 shdeshpa07 commented Feb 24, 2025

Jira

OADP Self-Service feature

Version

  • OCP 4.19 only

Preview

QE Review

  • QE has approved this change.

@shdeshpa07
Copy link
Contributor Author

/label OADP

@openshift-ci openshift-ci bot added OADP Label for all OADP PRs size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 24, 2025
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 4, 2025
@openshift-ci openshift-ci bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 13, 2025
@shdeshpa07 shdeshpa07 force-pushed the OADP-4001-Self-Service branch from dc07fa0 to d87b95c Compare March 21, 2025 05:51
@shdeshpa07 shdeshpa07 closed this Mar 26, 2025
@shdeshpa07 shdeshpa07 reopened this Mar 26, 2025
@shdeshpa07 shdeshpa07 force-pushed the OADP-4001-Self-Service branch from e672e74 to 568298f Compare April 4, 2025 09:47
@shdeshpa07
Copy link
Contributor Author

@anarnold97 - Requesting your review please and thanks.

@weshayutin
Copy link

@shdeshpa07 AWESOME work here Shruti! There are some things to cover in office hours so we're very clearly communicating the changes. Mostly just minor things to change/reword. I would like discuss and think about the non-admin use case section with you and the team in office hours. THANK YOU!!

@shubham-pampattiwar @mpryc as you folks have time, please jump in. This will most likely take a few iterations

@shdeshpa07
Copy link
Contributor Author

@shdeshpa07 AWESOME work here Shruti! There are some things to cover in office hours so we're very clearly communicating the changes. Mostly just minor things to change/reword. I would like discuss and think about the non-admin use case section with you and the team in office hours. THANK YOU!!

@shubham-pampattiwar @mpryc as you folks have time, please jump in. This will most likely take a few iterations

@weshayutin - Thank you for the review. I am on the feedback :).

@shdeshpa07
Copy link
Contributor Author

shdeshpa07 commented Apr 15, 2025

@weshayutin @mpryc @shubham-pampattiwar @PrasadJoshi12

Can I please request a review for the self-service PR. I have re-worked the sections based on our discussion in office hours yesterday. I am no longer delineating FSB/DM/CSI backups separately. I have also included a section of NADR.

Here is the preview again:

Self-Service

Self-Service cluster admin use cases

Self-Service namespace admin use cases

Self-Service troubleshooting

Thanks!

@shdeshpa07 shdeshpa07 closed this Apr 16, 2025
@shdeshpa07 shdeshpa07 reopened this Apr 16, 2025

Namespace admin users can:

* Create and manage backups of their authorized namespaces.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpryc A qq as per current design we only allow backing up a single namespace at a time, right ? Do you think we should mentioned that here.

Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
@shdeshpa07 shdeshpa07 force-pushed the OADP-4001-Self-Service branch from e7c973b to 18e34b2 Compare April 30, 2025 06:11
Copy link

openshift-ci bot commented Apr 30, 2025

@shdeshpa07: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@shdeshpa07
Copy link
Contributor Author

/label peer-review-needed

@openshift-ci openshift-ci bot added the peer-review-needed Signifies that the peer review team needs to review this PR label May 2, 2025
@michaelryanpeter
Copy link
Contributor

/label peer-review-in-progress

@openshift-ci openshift-ci bot added the peer-review-in-progress Signifies that the peer review team is reviewing this PR label May 2, 2025
Copy link
Contributor

@michaelryanpeter michaelryanpeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left some initial comments regarding some of the repeated issues in the PR. This is not a complete peer review. I did not make it all the way through the PR, and I did not review for grammar, minimalism, or more subtle style guide and markup issues. As a result, I am not putting the peer-review-done label on this.

PTAL at the comments and look for places where they can be applied elsewhere in the doc. Also, please read over the style guide links and consider how to apply the guidance. Please address the consistent issues before putting this PR back in the queue.

In the future, I would recommend chunking this work into several smaller PRs. 2000 lines of net-new writing takes a long time to review, so please be patient with the peer review squad. For a PR of this size, it might take a few rounds of peer review before it is ready for merge. I would expect that the next reviewer might need a full working day or several to perform a complete review.

If you have questions, I am most responsive on Slack. Feel free to DM me or start a thread in the #team-ocp-docs channel.

/remove-label peer-review-needed
/remove-label peer-review-in-progress

Also, if you don't have Vale set up in your IDE or terminal, I recommend asking for help in the #project-vale-at-red-hat Slack channel.


toc::[]

As a cluster administrator, following are some use cases where you:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the IBM Style Guide for lead-in wording on lists: https://www.ibm.com/docs/en/ibm-style?topic=format-lists#lead-in-wording. List lead-ins must be grammatically complete sentences.

This comment applies throughout the doc.


toc::[]

Following sections can help you troubleshoot common errors, when using {oadp-short} Self-Service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



[role="_additional-resources"]
.Additional resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These additional resources links seem to apply to the whole assembly and are not directly related to the proceeding module. If that is true, this needs to be an H2 heading. See the repo guidelines for more information.


:_mod-docs-content-type: CONCEPT
[id="oadp-self-service-about-nabsl_{context}"]
= About `NonAdminBackupStorageLocation` CR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use backticks or any other markup in headings. This comment applies throughout the PR.
https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#assemblymodule-titles-and-section-headings

[id="oadp-self-service-about-nabsl_{context}"]
= About `NonAdminBackupStorageLocation` CR

A `NonAdminBackupStorageLocation` (NABSL) is a custom resource that a namespace admin user can create to store the backup data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid passive voice.

Suggested change
A `NonAdminBackupStorageLocation` (NABSL) is a custom resource that a namespace admin user can create to store the backup data.
Namespace administrators can create a `NonAdminBackupStorageLocation` (NABSL) custom resource to store the backup data.

Comment on lines +39 to +43
In the example DPA, you have:

* Added the `enforceBSLSpec` section as shown in annotation *1*.
* Enforced the `config` section of a NABSL to use an {aws-short} S3 bucket in the us-west-2 region as shown in annotation *2*.
* Enforced the `objectStorage` section of a NABSL to use a company bucket named `my-company-bucket` as shown in annotation *3*.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way of using code callouts is incorrect. You can use code callouts or create a description/definition list. But both options have specific style rules that need to be followed. See https://redhat-documentation.github.io/modular-docs/#creating-reference-modules

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the previous comment regarding lists and reference modules.


The {oadp-short} Self-Service feature has the following new custom resources (CRs) to enable the backup and restore operations for a namespace admin user:

* `NonAdminController` (NAC): Controls and orchestrates the Self-Service operations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be formatted as a description/definition list.

Suggested change
* `NonAdminController` (NAC): Controls and orchestrates the Self-Service operations.
`NonAdminController` (NAC):: Controls and orchestrates the Self-Service operations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment applies throughout the doc.

* The cluster administrator has installed the {oadp-short} Operator.
* The cluster administrator has configured the `DataProtectionApplication` (DPA) to enable {oadp-short} Self-Service.
* The cluster administrator has created a namespace for you and has authorized you to operate from that namespace.
* Optionally, you can create and use a `NonAdminBackupStorageLocation` (NABSL) CR to store the backup data. If you do not use a NABSL CR, then the backup is stored in the default backup storage location configured in the DPA.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ISG on Optional and conditional steps: https://www.ibm.com/docs/en/ibm-style?topic=format-procedures#indicating-optional-and-conditional-steps

That said, it doesn't really make sense that to have an optional prereq. I would find another way to describe this environment constraint.


. To create a `NonAdminBackup` CR, create a YAML manifest file with the following configuration:
+
.Example `NonAdminBackup`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.Example `NonAdminBackup`
.Example `NonAdminBackup` CR

See https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#api-object-formatting

All specific API object references (ie, anything in backticks) must be followed by a noun. This comment applies throughout the doc.

@openshift-ci openshift-ci bot removed peer-review-needed Signifies that the peer review team needs to review this PR peer-review-in-progress Signifies that the peer review team is reviewing this PR labels May 2, 2025

In the earlier versions of {oadp-full}, you needed the `cluster-admin` role to perform {oadp-short} operations such as backing up and restoring an application, creating a backup storage location, and so on. For more details on cluster roles, see "Default cluster roles".

From {oadp-short} 1.5.0 onward, you do not need the `cluster-admin` role to perform the backup and restore operations. You can use {oadp-short} with the namespace `admin` role. The namespace `admin` role has administrator access only to the namespace the user is assigned to.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a note that you still need the cluster admin to install OADP Operator ? Installation of OADP Operator is not supported for non-admin users

* `nonadminrestores.oadp.openshift.io`
* `nonadmindownloadrequests.oadp.openshift.io`

A namespace admin user cannot edit the `NonAdminBackupStorageLocation` (NABSL) CR. They can only create a new NABSL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not accurate. OADP/NAC cannot directly control this. If the namespace admin has edit access, they can edit the NABSL CR.

resources:
- nonadminbackups
- nonadminrestores
- nonadminbackupstoragelocations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add NADR CR too


* To ensure secure backup and restore, Self-Service automatically excludes the following resources from being backed up or restored:

** Security Context Constraints (SCCs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add codeblocks for all the resources in this list, just like PriorityClasses

** Security Context Constraints (SCCs)
** Cluster roles
** Cluster role bindings
** Custom resource definitions (CRDs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add NS scoped Non-Admin CRs:

alwaysExcludedNamespacedResources = []string{
		nacv1alpha1.NonAdminBackups,
		nacv1alpha1.NonAdminRestores,
		nacv1alpha1.NonAdminBackupStorageLocations,
	}
	alwaysExcludedClusterResources = []string{
		"securitycontextconstraints",
		"clusterroles",
		"clusterrolebindings",
		"priorityclasses",
		"customresourcedefinitions",
		"virtualmachineclusterinstancetypes",
		"virtualmachineclusterpreferences",
	}

|===
|*Value* |*Description*
|`New`|NAB/NAR CR creation request is accepted by the NAC, but it has not yet been validated by the NAC.
|`BackingOff`|NAB/NAR CR is invalidated by the NAC because of an invalid NAB/NAR `spec`. The NAC fails to reconcile the CRs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, lets remove this statement: The NAC fails to reconcile the CRs.


You can create a NABSL CR by using one of the following workflows:

* *Administrator creation workflow*: In this workflow, the cluster administrator creates the NABSL CR for the namespace admin user. The administrator then sets the NABSL in the `spec.backupstoragelocation` section of the DPA.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems inaccurate "The administrator then sets the NABSL in the spec.backupstoragelocation section of the DPA." @mpryc please check.

Copy link

@mpryc mpryc May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The admin can create default BSL in the oadp namespace or create for the users NABSL in the users namespace.
In the second scenario the user must then reference that NABSL in the Non Admin Backup object. The above doc is not correct.

====
For security purposes, it is recommended to use either the administrator creation or the administrator approval workflow. The automatic approval workflow is less secure as it does not require administrator review.

Also note that, a namespace admin user cannot edit the NABSL CR.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would reframe to say that "Edit functionality is not sipported for NABSL CR" or something similar.

[id="oadp-self-service-admin-spec-enforce-nab_{context}"]
= Self-Service administrator spec enforcement for NAB

As a cluster administrator, you can enforce the following fields for a `NonAdminBackup` (NAB) CR:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should change the approach here, we should document what spec fields are non-enforceable by the admins and the special cases etc. Velero API keeps evolving per release, documenting allowlist is a difficult task.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shubham-pampattiwar wdyt about us creating a kbase article that we can update and perhaps that is something the docs could point to. I'm not 100% sure the docs team is allowed to point at a kbase, it's worth asking. If we do think it's going to be very dynamic release to release I would suggest we exclude it from the production docs and ONLY have a kbase article.

[id="oadp-self-service-namespace-permissions_{context}"]
= {oadp-short} Self-Service namespace permissions

As a cluster administrator, ensure that a namespace admin user has editor roles assigned for the following list of objects in their namespace. These objects ensure that a namespace admin user can perform the backup and restore operations in their namespace.
Copy link

@weshayutin weshayutin May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reference link to the defined cluster user roles would be appropriate here:
https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/authentication_and_authorization/using-rbac#authorization-overview_using-rbac

noting the admin role..

Also noting that a cluster-admin can define their own specifications to users that have equivilant rights as a project or namespace admin. @mail2nadeem92 FYI please add flavor if I did not cover it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OADP Label for all OADP PRs size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants