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

feature: new wait for resource command that uses kstatus #2497

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phillebaba
Copy link
Member

@phillebaba phillebaba commented May 13, 2024

Description

This change adds a new wait-for-resource command which is meant to replace the original wait-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

@phillebaba phillebaba requested a review from a team as a code owner May 13, 2024 14:10
@phillebaba phillebaba marked this pull request as draft May 13, 2024 14:10
Copy link

netlify bot commented May 13, 2024

Deploy Preview for zarf-docs ready!

Name Link
🔨 Latest commit 6000d23
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/6644d4b8334c7700083ad9c9
😎 Deploy Preview https://deploy-preview-2497--zarf-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@phillebaba phillebaba changed the title Add new wait for resource command that use kstatus Add new wait for resource command that uses kstatus May 13, 2024
@phillebaba phillebaba marked this pull request as ready for review May 15, 2024 15:29
@phillebaba phillebaba changed the title Add new wait for resource command that uses kstatus feature: new wait for resource command that uses kstatus May 15, 2024
Copy link
Member

@lucasrod16 lucasrod16 left a 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?

@phillebaba
Copy link
Member Author

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.

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.

None yet

2 participants