-
Notifications
You must be signed in to change notification settings - Fork 7
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
CRD updates for the oc CLI fields for the NAR, NAB and NABSL objects #245
base: master
Are you sure you want to change the base?
Conversation
Implements migtools#232 with additional fields for: - NonAdminBackup - NonAdminRestore - NonAdminBackupStorageLocation Signed-off-by: Michal Pryc <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mpryc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold OADP PR |
@@ -98,6 +98,9 @@ type NonAdminBackupStatus struct { | |||
// +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name can not contain spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
@@ -71,6 +71,10 @@ type NonAdminBackupStorageLocationStatus struct { | |||
// +kubebuilder:object:root=true | |||
// +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -84,6 +84,10 @@ type NonAdminBackupStorageLocationRequestStatus struct { | |||
// +kubebuilder:object:root=true | |||
// +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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ?
Depends-On: openshift/oadp-operator#1648
Implements #232 with additional fields for:
Why the changes were made
To fix #232 and add similar fields for the NAB and NAR objects.
How to test the changes made
Prior admin approval or rejections
Created couple of BSLs - names reflect the idea behind each of them
Before any admin action:
Note the
nonexistingsecretinns-nabsl
have 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: