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 tools kubectl, tools wait-for & Wait Action. #1373

Merged
merged 21 commits into from
Feb 21, 2023
Merged

Conversation

jeff-mccoy
Copy link
Contributor

@jeff-mccoy jeff-mccoy commented Feb 19, 2023

Vendors in kubectl and adds a new zarf tools wait-for command that is wrapper around kubectl get + kubectl wait. Also adds a new concept of a wait action.

Features:

  • Wait for k8s resources to exist
  • Wait for k8s resources to exist & have a specified status
  • Use name or label selectors for k8s resources
  • Wait for http(s) endpoints to have a specific response code
  • Wait for generic network endpoints to appear to be up
  • Specify a custom timeout window

Screenshot 2023-02-20 at 10 24 17 AM

Related Issue

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@netlify
Copy link

netlify bot commented Feb 19, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 2701858
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/63f51c8d4c4ebb0008b7302d

@jeff-mccoy
Copy link
Contributor Author

Custom kubectl actions (without wait-for)
Screenshot 2023-02-19 at 3 42 49 AM

@Noxsios
Copy link
Contributor

Noxsios commented Feb 20, 2023

This change will remove the dependency of the kubectl CLI for Zarf operations, the docs will need to updated accordingly.

@jeff-mccoy jeff-mccoy marked this pull request as draft February 20, 2023 09:05
@jeff-mccoy
Copy link
Contributor Author

Switched back to draft until I can push up the action changes.

@jeff-mccoy jeff-mccoy marked this pull request as ready for review February 21, 2023 14:49
@jeff-mccoy jeff-mccoy requested review from mike-winberry, Noxsios and a team as code owners February 21, 2023 14:49
examples/flux-test/zarf.yaml Outdated Show resolved Hide resolved
src/cmd/tools/common.go Outdated Show resolved Hide resolved
src/config/lang/english.go Show resolved Hide resolved
src/types/component.go Outdated Show resolved Hide resolved
docs/4-user-guide/5-component-actions.md Outdated Show resolved Hide resolved
docs/4-user-guide/5-component-actions.md Outdated Show resolved Hide resolved
src/types/component.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm

@jeff-mccoy jeff-mccoy changed the title Add tools kubectl and tools wait-for commands Add tools kubectl, tools wait-for & Wait Action. Feb 21, 2023
@Racer159 Racer159 merged commit 22e84ab into main Feb 21, 2023
@Racer159 Racer159 deleted the kubetl-wait-for branch February 21, 2023 20:51
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
Vendors in kubectl and adds a new `zarf tools wait-for` command that is
wrapper around `kubectl get` + `kubectl wait`. Also adds a new concept
of a `wait action`.

Features:
- Wait for k8s resources to exist
- Wait for k8s resources to exist & have a specified status
- Use name or label selectors for k8s resources
- Wait for http(s) endpoints to have a specific response code
- Wait for generic network endpoints to appear to be up
- Specify a custom timeout window

![Screenshot 2023-02-20 at 10 24 17
AM](https://user-images.githubusercontent.com/882485/220378021-0a921e90-ccba-4fc7-a3ce-d4a55f3d993a.png)


## Related Issue

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Co-authored-by: Wayne Starr <[email protected]>
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.

3 participants