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

[Question] Wait for deletion fail if not exist, how to skip the error #1831

Open
nkuacac opened this issue Aug 8, 2024 · 2 comments
Open
Labels
question Further information is requested

Comments

@nkuacac
Copy link

nkuacac commented Aug 8, 2024

Describe your question

| 13:23:14 | superkruise.virtualcluster.sample.001 | step-2   | CMD       | RUN   |
    === COMMAND
    /usr/local/bin/kubectl wait virtualclusters.v1alpha1.clusters.superkruise.io --for=delete virtual-cluster-001 -n chainsaw-ultimate-viper -o yaml --timeout 1m0s
| 13:23:14 | superkruise.virtualcluster.sample.001 | step-2   | CMD       | LOG   |
    === STDERR
    Error from server (NotFound): virtualclusters.clusters.superkruise.io "virtual-cluster-001" not found
| 13:23:14 | superkruise.virtualcluster.sample.001 | step-2   | CMD       | ERROR |
    === ERROR
    exit status 1

chainsaw version Version

v0.2.7

Additional context

No response

@nkuacac nkuacac added the question Further information is requested label Aug 8, 2024
@eddycharly
Copy link
Member

Hey, thanks for reporting.
Is there an option in kubectl to ignore not found ?

@nkuacac
Copy link
Author

nkuacac commented Aug 14, 2024

Hey, thanks for reporting. Is there an option in kubectl to ignore not found ?

Thanks for reply. kubectl don't have this option. My method is
kubectl wait vc virtual-cluster-001 --for=delete -n chainsaw-ultimate-viper -o yaml --timeout 1m0s 2>&1 |grep -v 'timed out'

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

No branches or pull requests

2 participants