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

podres: client: make independent of k8s code #206

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Conversation

ffromani
Copy link
Contributor

@ffromani ffromani commented Aug 9, 2023

It's actively discouraged by k8s project to import k8s.io/kubernetes
packages, and, in addition to this, it's recommended (https://github.com/kubernetes/kubernetes/blob/v1.28.0-rc.0/pkg/kubelet/apis/podresources/client.go#L32)
to reimplement the client in each consuming project, copying and pasting the related functions.

We missed this recommentation up until now, so we do it now.
This way, we can remove the latest dep to k8s.io/kubernetes,
have less deps overall and a leaner vendor/.

@ffromani ffromani force-pushed the independent-podres-cli branch 2 times, most recently from 92d5044 to 2ded56d Compare August 10, 2023 06:38
@ffromani ffromani force-pushed the independent-podres-cli branch from 2ded56d to 271dd40 Compare August 10, 2023 14:14
It's actively discouraged by k8s project to import `k8s.io/kubernetes`
packages, and, in addition to this, it's recommended (https://github.com/kubernetes/kubernetes/blob/v1.28.0-rc.0/pkg/kubelet/apis/podresources/client.go#L32)
to reimplement the client in each consuming project, copying and pasting the related functions.

We missed this recommentation up until now, so we do it now.
This way, we can remove the latest dep to `k8s.io/kubernetes`,
have less deps overall and a leaner `vendor/`.

Signed-off-by: Francesco Romani <[email protected]>
classic `go mod tidy && go mod vendor` run

Signed-off-by: Francesco Romani <[email protected]>
@ffromani ffromani force-pushed the independent-podres-cli branch from 271dd40 to 9072547 Compare August 21, 2023 12:20
@ffromani ffromani changed the title WIP: k8s-independent podres client podres: client: make independent of k8s code Aug 21, 2023
@ffromani ffromani requested review from swatisehgal and Tal-or August 21, 2023 12:21
Copy link
Collaborator

@swatisehgal swatisehgal left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@ffromani ffromani merged commit c4c166e into main Aug 21, 2023
@ffromani ffromani deleted the independent-podres-cli branch August 21, 2023 13:05
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.

2 participants