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

Option --label-columns in get backup Velero CLI is not working #4710

Closed
danfengliu opened this issue Mar 1, 2022 · 3 comments · Fixed by #5291
Closed

Option --label-columns in get backup Velero CLI is not working #4710

danfengliu opened this issue Mar 1, 2022 · 3 comments · Fixed by #5291
Assignees
Labels

Comments

@danfengliu
Copy link
Contributor

What steps did you take and what happened:
Option --label-columns in get backup should be a filter for displaying table of backups, but no matter what I attach after this option (--label-columns name,status), the table returned by this command is not changed at all.

What did you expect to happen:

The following information will help us better understand what's going on:

If you are using velero v1.7.0+:
Please use velero debug --backup <backupname> --restore <restorename> to generate the support bundle, and attach to this issue, more options please refer to velero debug --help

If you are using earlier versions:
Please provide the output of the following commands (Pasting long output into a GitHub gist or other pastebin is fine.)

  • kubectl logs deployment/velero -n velero
  • velero backup describe <backupname> or kubectl get backup/<backupname> -n velero -o yaml
  • velero backup logs <backupname>
  • velero restore describe <restorename> or kubectl get restore/<restorename> -n velero -o yaml
  • velero restore logs <restorename>

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Velero version (use velero version):
  • Velero features (use velero client config get features):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@cleverhu
Copy link
Contributor

cleverhu commented Sep 6, 2022

The usage of --label-columns is incorrect.
The correct usage is like:

kubectl label nodes k8s-master my-label=hello                                                           
node/k8s-master labeled
kubectl get node -L my-label
NAME         STATUS   ROLES           AGE   VERSION   MY-LABEL
k8s-master   Ready    control-plane   26d   v1.25.0   hello
k8s-node1    Ready    <none>          26d   v1.25.0

for velero, the usage example is like:

velero backup get --label-columns  velero.io/storage-location

NAME                            STATUS      ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR      STORAGE-LOCATION
nginx-backup                    Completed   0        0          2022-09-06 16:49:12 +0800 CST   29d       default            <none>        default
schedule-test-20220906090007    Completed   0        0          2022-09-06 17:00:07 +0800 CST   21h       default            app=my-dep    default

Here is a document of it:
https://kakakakakku.hatenablog.com/entry/2021/02/22/141929

@qiuming-best
Copy link
Contributor

@cleverhu Thanks for your comments on this issue

@danfengliu
Copy link
Contributor Author

@cleverhu It does a misunderstanding for this issue, thank you for your clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants