Skip to content
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

Add status column to get BSL output #2493

Merged
merged 2 commits into from
May 28, 2020

Conversation

carlisia
Copy link
Contributor

@carlisia carlisia commented May 1, 2020

This closes #2489.

image

Question

It seems to me as arbitrary to specify an empty status with Available as it would be with Unavailable - here: https://github.com/vmware-tanzu/velero/compare/master...carlisia:c-2489-bsl-column?expand=1#diff-c73073c993c3249edf0a5d8b6d30fa87R64

Should there be a third phase, maybe status Unknown? I'm not super set on this, we could make it available/unavailable.

Signed-off-by: Carlisia [email protected]

@carlisia carlisia requested review from skriss, ashish-amarnath and nrb May 1, 2020 18:32
@carlisia
Copy link
Contributor Author

carlisia commented May 1, 2020

Or maybe Unverified.

This is because when the BSL gets created on the client side it isn't validated then, that only happens when the BSL controller runs (see: #2490).

@carlisia carlisia self-assigned this May 1, 2020
Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

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

commented on the empty phase question, other than that it LGTM!


status := location.Status.Phase
if status == "" {
status = velerov1api.BackupStorageLocationPhaseAvailable
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd display this as <Unknown> or something along those lines, since we don't yet know if it's available.

Even if we define a third phase of Unknown, new CRs could still have an empty phase (until we add defaulting to our CRD specs), so I do think it makes sense to check for and handle an empty status.phase field here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, make sense. Looks like this now:

image

Signed-off-by: Carlisia <[email protected]>
Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

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

LGTM!

@ashish-amarnath ashish-amarnath merged commit 40d8511 into vmware-tanzu:master May 28, 2020
@carlisia carlisia deleted the c-2489-bsl-column branch May 28, 2020 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a column to indicate the BSL status on velero backup-location get
3 participants