Refactor/e2e reuse k8s clients#502
Merged
oleg-kushniriov merged 18 commits intoApr 12, 2026
Merged
Conversation
b4a1638 to
35f5f3b
Compare
gflarity
reviewed
Apr 6, 2026
danbar2
reviewed
Apr 9, 2026
danbar2
previously approved these changes
Apr 9, 2026
eff08e7 to
9813ea4
Compare
danbar2
previously approved these changes
Apr 12, 2026
shayasoolin
reviewed
Apr 12, 2026
shayasoolin
approved these changes
Apr 12, 2026
danbar2
approved these changes
Apr 12, 2026
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.
What type of PR is this?
/kind cleanup
/kind e2e
What this PR does / why we need it:
Refactors the e2e test framework from flat utility functions and a monolithic
TestContext struct into domain-specific manager structs with bound methods.
New packages:
e2e/k8s/—Clients,PodManager,NodeManager,ResourceManager, polling, conversionse2e/grove/—WorkloadManager,TopologyVerifier,PodGroupVerifier,OperatorConfige2e/diagnostics/—DiagCollectore2e/tests/suite.go—TestSuitecomposing all managers with functional optionsKey fixes:
SharedClusterManagerinstead of beingrecreated per-test via
CreateKubernetesClientscalls converted to TestSuite method calls)
Design for future parallel suites:
TestSuite.Namespaceis per-suite (can be unique for parallel runs)k8s.Clientsis goroutine-safe (shared across suites)Which issue(s) this PR fixes:
Fixes #513
Fixes #513
Special notes for your reviewer:
TestContextand its methods insetup.go/debug_utils.goare markeddeprecated but kept — they are still used by the diagnostics path and will
be removed in a follow-up once
debug_utils.goconsumers are fully migrated.auto-mnnvl/tests use their own lowercasetestContextstruct and wereintentionally not migrated in this PR to keep scope manageable.
utils/package files remain as deprecated wrappers. Onlylogger.goand
measurement/are long-term residents; the rest will be deleted in afollow-up PR.
cert management, rolling updates) have been migrated to use
TestSuite.Does this PR introduce a API change?
Additional documentation e.g., enhancement proposals, usage docs, etc.: