chainguard-dev / chainguard-dev/tw
tw/commands: add a new functionality or tool to expect a particular Pods to spin up in a certain period
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 36
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 6
Description
Some Kubernetes Operators spins up Pods after we apply Custom Resource. But it usually took a while during reconciliation and get healthy status. So the Pods don’t exist yet for a certain period.
Example:
wait_for_existence -n foo 'app.kubernetes.io/name=bar' --timeout=5m
This command would execute the followings in order:
- Set timeout to N seconds and interval to M seconds
- Loop until timeout is reached
- Brute-force get pod status with
kubectl get podswith selection filter - If no pods exist yet, print waiting message
- If pods exist (on matching), check for Running status with
kubectl wait - If a match is found, and healthy, print success message and exit
- Otherwise, print waiting message
- Sleep for the interval and increment elapsed time
- timeout is reached, print failure message and exit
cc @joshrwolf
Fun fact: This is the FIRST ISSUE!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the tw/commands entry points and existing command patterns. Implement the described polling flow for a namespace, label selector, interval, and timeout, then verify that it waits for matching Pods to become Running and reports success or failure as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100