CRD updates for the oc CLI fields for the NAR, NAB and NABSL objects#245
Conversation
|
/hold OADP PR |
| // +kubebuilder:object:root=true | ||
| // +kubebuilder:subresource:status | ||
| // +kubebuilder:resource:path=nonadminbackups,shortName=nab | ||
| // +kubebuilder:printcolumn:name="Backup-Status",type="string",JSONPath=".status.veleroBackup.status.phase" |
There was a problem hiding this comment.
from velero
$ velero backup-location get
NAME PROVIDER BUCKET/PREFIX PHASE LAST VALIDATED ACCESS MODE DEFAULT
velero-sample-1 aws my-bucket-name/velero Unavailable 2025-03-06 12:54:30 +0000 UTC ReadWrite true
$ velero backup get
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
backup Failed 0 0 2025-03-06 12:56:14 +0000 UTC 29d velero-sample-1 <none>
$ velero restore get
NAME BACKUP STATUS STARTED COMPLETED ERRORS WARNINGS CREATED SELECTOR
restore backup Failed 2025-03-06 12:56:45 +0000 UTC 2025-03-06 12:56:46 +0000 UTC 0 0 2025-03-06 12:56:45 +0000 UTC <none>it makes sense to call Backup Status and Status, but I think it would be better Backup Phase and Phase,
There was a problem hiding this comment.
How about this?
| // +kubebuilder:subresource:status | ||
| // +kubebuilder:resource:path=nonadminbackupstoragelocations,shortName=nabsl | ||
| // +kubebuilder:printcolumn:name="Approved",type="string",JSONPath=".status.conditions[?(@.type=='ClusterAdminApproved')].status" | ||
| // +kubebuilder:printcolumn:name="BSL-Status",type="string",JSONPath=".status.veleroBackupStorageLocation.status.phase" |
There was a problem hiding this comment.
from velero
$ velero backup-location get
NAME PROVIDER BUCKET/PREFIX PHASE LAST VALIDATED ACCESS MODE DEFAULT
velero-sample-1 aws my-bucket-name/velero Unavailable 2025-03-06 12:54:30 +0000 UTC ReadWrite true
$ velero backup get
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
backup Failed 0 0 2025-03-06 12:56:14 +0000 UTC 29d velero-sample-1 <none>would change BSL-Status to Storage Location Phase (if spaces are allowed) and Status to Phase
There was a problem hiding this comment.
does the order matter?
currently is APPROVED -> BSL-Phase -> Phase (NABSL)
would be better to change to NABSL phase -> Approved -> Storage Location Phase?
There was a problem hiding this comment.
I would really not like to have spaces as this isn't a good CLI/Shell practice in my opinion. It's hard to use awk/sed/cut for those as well they make have affect on the alignment in various terminal systems.
| // +kubebuilder:subresource:status | ||
| // +kubebuilder:resource:path=nonadminbackupstoragelocationrequests,shortName=nabslrequest | ||
| // +kubebuilder:printcolumn:name="NABSL-Namespace",type="string",JSONPath=".status.nonAdminBackupStorageLocation.namespace" | ||
| // +kubebuilder:printcolumn:name="NABSL-Name",type="string",JSONPath=".status.nonAdminBackupStorageLocation.name" |
There was a problem hiding this comment.
would drop NABSL prefix in namespace title. having just namespace I think is enough m(this is a request for NAMESPACE X)
would also drop NAME suffix for NABSL
There was a problem hiding this comment.
This object is mostly viewable by the cluster admin to interact with and the namespace and name is the one that requested the BSL creation, we can drop it, but would this be easy enough to understand without reading documentation ?
bdb2859 to
4176804
Compare
|
Updated, please refer to the following comment for details: openshift/oadp-operator#1648 (comment) In the PR description there are updated column names and it's order to reflect current implementation: |
|
/retest |
Implements migtools#232 with additional fields for: - NonAdminBackup - NonAdminRestore - NonAdminBackupStorageLocation Signed-off-by: Michal Pryc <mpryc@redhat.com>
4176804 to
c1fc2d5
Compare
Change required by the migtools/oadp-non-admin#245 Signed-off-by: Michal Pryc <mpryc@redhat.com>
|
this one is required first: openshift/oadp-operator#1709 @weshayutin ^^ FYI |
|
The following one got merged: Then the current PR never got merged, and the subsequent OADP update removed the above one (see openshift/oadp-operator@67020bf#diff-367ce0b764dc1ca544b1d76f9b8d8265ccbcf1a6ac552fed21b5cd0f73920515). We need to sync those merges, otherwise there will be always removal of oadp parts during next manifest updates. |
…1709) Change required by the migtools/oadp-non-admin#245 Signed-off-by: Michal Pryc <mpryc@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mpryc, shubham-pampattiwar, weshayutin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c8df739
into
migtools:master
|
/cherry-pick oadp-1.5 |
|
@shubham-pampattiwar: new pull request created: #268 DetailsIn response to this:
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. |
Change required by the migtools/oadp-non-admin#245 Signed-off-by: Michal Pryc <mpryc@redhat.com>
…1711) Change required by the migtools/oadp-non-admin#245 Signed-off-by: Michal Pryc <mpryc@redhat.com> Co-authored-by: Michal Pryc <mpryc@redhat.com>
Depends-On: openshift/oadp-operator#1709
Implements #232 with additional fields for:
Why the changes were made
To fix #232 and add similar fields for the NAB and NAR objects.
Prior admin approval or rejections
Created couple of BSLs - names reflect the idea behind each of them
Before any admin action:
Note the
nonexistingsecretinns-nabslhave not created request - the user must create secret to get to that stateApproving or rejecting some:
Now the NABSL objects
Backup
Couple of backup objects were created
Restore
Nice InProgress and Completed status: