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

Refactor type Environment and env Config to support new typeklient.Client #34

Merged

Conversation

vladimirvivien
Copy link
Contributor

@vladimirvivien vladimirvivien commented Jul 15, 2021

This PR is needed to refactor the way type Environment is constructed and initialized with package klient which did not exist when this package was created. This work is also a precursor to the refactoring work that will take place to fix context propagation.

This potentially will address

Context propagation will be handled in a future PR

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vladimirvivien

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Jul 15, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2021
@vladimirvivien vladimirvivien self-assigned this Jul 15, 2021
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 15, 2021
@vladimirvivien vladimirvivien changed the title Refactor type environment to support klient.Client [WIP] Refactor type environment to support klient.Client Jul 15, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2021
@vladimirvivien vladimirvivien changed the title [WIP] Refactor type environment to support klient.Client [WIP] Refactor type Environment to support new typeklient.Client Jul 15, 2021
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 16, 2021
@vladimirvivien vladimirvivien changed the title [WIP] Refactor type Environment to support new typeklient.Client Refactor type Environment and env Config to support new typeklient.Client Jul 16, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 16, 2021
@vladimirvivien
Copy link
Contributor Author

@cpanato @ShwethaKumbla @andrewsykim PTAL

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

thanks, lgtm, just need to fix the lint issues we I think we are good to go

klient/client.go Outdated Show resolved Hide resolved
pkg/envconf/config.go Outdated Show resolved Hide resolved
}

func randNS() string {
bytes := make([]byte, 25)
Copy link
Member

Choose a reason for hiding this comment

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

maybe we can use github.com/google/uuid and generate an uuid and remove the testns-%s.

just an idea :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cpanato thanks. I will checkout the google project.
Also, I added the "test" so that if, for whatever reasons, a namespace lingers, you will be able to easily identify it.

Copy link
Member

Choose a reason for hiding this comment

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

make sense, as i said just a suggestion :)

…lient

This PR refactors type env.Environment and envconf.Config to support new type klient.Client.
Thype klient.Client makes easy to access the functionalities of the klient package from
one type withouth having to create several steps.

Signed-off-by: Vladimir Vivien <vivienv@vmware.com>
@ShwethaKumbla
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 19, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1a6ef66 into kubernetes-sigs:master Jul 19, 2021
@vladimirvivien vladimirvivien deleted the klient-Client-type branch June 23, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants