refactor kubernetes client - #782
Merged
klihub merged 3 commits intoSep 15, 2026
Merged
Conversation
bart0sh
marked this pull request as ready for review
September 14, 2026 08:09
Contributor
Author
|
@klihub PTAL |
Collaborator
|
Could we change git commit messages a bit, changing from: to: or, alternatively, no mention about the model at all, if you see no reason for it. |
Collaborator
|
Otherwise, this looks good to me. |
Kubernetes-related helpers are being consolidated under pkg/kubernetes so they can be shared beyond the agent. Move the watch package there first, as a plain rename, ahead of adding the new kubernetes client package. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Add a pkg/kubernetes/client package that bundles the REST config, HTTP client, and clientset construction (from a kubeconfig file or in-cluster config) behind a single Client type, so callers no longer need to wire up all three separately. Not yet used by anything; pkg/agent will be switched over next. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Replace the agent's hand-rolled REST config/HTTP client/clientset setup with the new pkg/kubernetes/client wrapper. This also drops the now-redundant getRESTConfig helper and exposes the wrapped client, kubeconfig path, and REST config to callers via new KubeClient/KubeConfig/RestConfig accessors. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
bart0sh
force-pushed
the
PR002-refactor-kubernetes-client
branch
from
September 14, 2026 16:39
7f036c6 to
ba5f16e
Compare
Contributor
Author
|
@askervin Removed "Co-Authored-By" from all commits. The PR should be ready for a merge. |
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.
This PR is based on #536
It's a preparation PR for upcoming DRA integration PR #774