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

cp env util from kubernetes/kubernetes #194

Merged
merged 18 commits into from
Nov 10, 2020

Conversation

pigletfly
Copy link
Member

What type of PR is this?
/kind cleanup

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Release note:
None


@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 3, 2020
@pigletfly
Copy link
Member Author

When this PR is merged, I will send a PR in k/k to update the vendor directory.

@pigletfly
Copy link
Member Author

/assign @apelisse

@pigletfly
Copy link
Member Author

And does #9 list all the pkgs that should be moved to utils repo ? I'd like to help to move them to here.

@dims
Copy link
Member

dims commented Nov 3, 2020

/assign @thockin

Tim, WDYT? of this new API

Copy link
Member

@apelisse apelisse left a comment

Choose a reason for hiding this comment

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

I'm curious how much this is used? This is also so "simple" that it doesn't add a lot of value.

env/env.go Outdated Show resolved Hide resolved
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

This is borderline pointless, but not obviously so. How many callers of this are there?

env/env.go Show resolved Hide resolved
env/env.go Outdated Show resolved Hide resolved
env/env.go Outdated Show resolved Hide resolved
env/env.go Outdated Show resolved Hide resolved
env/env.go Outdated

// GetEnvAsFloat64OrFallback returns the env variable (parsed as float64) for
// the given key and falls back to the given defaultValue if not set
func GetEnvAsFloat64OrFallback(key string, defaultValue float64) (float64, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I would drop "64" - we're not going to add multiple flavors, I think. :)

env/env.go Outdated Show resolved Hide resolved
env/env.go Show resolved Hide resolved
env/env_test.go Outdated Show resolved Hide resolved
env/env.go Outdated Show resolved Hide resolved
@pigletfly
Copy link
Member Author

PTAL @thockin @apelisse

@pigletfly pigletfly force-pushed the util-env branch 3 times, most recently from b42bde6 to 0a5333d Compare November 4, 2020 10:20
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I'd totally forgotten we still had Flocker support.

env/env_test.go Outdated Show resolved Hide resolved
env/env_test.go Show resolved Hide resolved
env/doc.go Outdated Show resolved Hide resolved
env/env.go Show resolved Hide resolved
@thockin
Copy link
Member

thockin commented Nov 10, 2020

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 10, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pigletfly, thockin

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 10, 2020
@k8s-ci-robot k8s-ci-robot merged commit 67b214c into kubernetes:master Nov 10, 2020
@pigletfly pigletfly deleted the util-env branch November 11, 2020 13:21
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants