-
Notifications
You must be signed in to change notification settings - Fork 173
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
feature: new wait for resource command that uses kstatus #2497
Conversation
✅ Deploy Preview for zarf-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Nice work on this @phillebaba!
@brandtkeller and @Racer159 noted that they would like the functionality of ExecuteWaitResource
available as a library function in pkg so that it's available for reuse in Lula and Maru without having to import Zarf. This means we would move ExecuteWaitResource
to the pkg
repo and consume it as a library in Zarf. This would be a good opportunity to add some unit tests to cover the behavior as well
Thoughts?
I had a look at this PR again as I need the wait functionality for another feature in Zarf. My question is if this is enough for it's own package. I realize that other projects also need this functionality. Would it not be better to document how to use kstatus instead? Most of the code do use kstatus is for the most part to get the required config objects. |
I am closing this in favor of adding this as a feature in the package spec instead. |
Description
This change adds a new
wait-for-resource
command which is meant to replace the originalwait-for
command in the future. The main difference with the new command is that it uses kstatus to determine the readiness of a resource rather than requiring users to specify a condition. This functionality is implemented using a library rather than shelling out to kubectl. The goal is to in a later PR replace the Zarf wait shorthand to use this code instead of shelling out to the tool.Related Issue
Relates to #2203
Checklist before merging