feat: add kubernetes-test package with wait-for-pods functionality#54
Merged
pyramation merged 2 commits intomainfrom Jan 6, 2026
Merged
feat: add kubernetes-test package with wait-for-pods functionality#54pyramation merged 2 commits intomainfrom
pyramation merged 2 commits intomainfrom
Conversation
- Add @interweb/kubernetes-test package for Kubernetes testing utilities - Implement waitForPods, waitForPodByName, and waitForPodsWithLabel functions - Use kubernetesjs for K8s API types and client - Include comprehensive TypeScript types for pod status tracking - Add error handling with WaitForPodsTimeoutError and WaitForPodsError - Include basic test suite for type definitions
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add kubernetes-test package with wait-for-pods functionality
Summary
Adds a new
kubernetes-testpackage to the dev-utils monorepo that provides Kubernetes testing utilities. The initial implementation includes awaitForPodsfunction that polls the Kubernetes API until pods reach a ready state, with configurable timeout, polling interval, and label/field selectors.Key features:
waitForPods()- Wait for pods matching selectors to become readywaitForPodByName()- Convenience wrapper for waiting on a specific podwaitForPodsWithLabel()- Convenience wrapper for label-based selectionWaitForPodsTimeoutError,WaitForPodsError) with progress informationUses
kubernetesjsfor K8s API types and client interactions.Updates since last revision
@interweb/kubernetes-testtokubernetes-test(removed scope per user request)Review & Testing Checklist for Human
wait-for-pods.ts: Thewhile (true)loop with timeout check - verify edge cases are handled (e.g., what if pods never appear, what if namespace doesn't exist)listCoreV1NamespacedPodcall uses{ path: { namespace }, query: { labelSelector, fieldSelector } }structure - confirm this matches kubernetesjs expectationsRecommended Test Plan
kubectl proxylocallywaitForPods()with appropriate selectors and verify it returns when pods are readyNotes
Requested by: Dan Lynch (@pyramation)
Devin session: https://app.devin.ai/sessions/fb12157dbe184b43bb018c1aa54508a0