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

Add cluster name environment variable #4560

Merged

Conversation

rocktavious
Copy link
Contributor

  • Add an environment variable to configure cluster name
  • Expose envionrment variable in CLI documentation

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 2, 2018
@rocktavious
Copy link
Contributor Author

SIgned CLA

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 2, 2018
@rocktavious
Copy link
Contributor Author

/assign @justinsb

@chrislovecnm
Copy link
Contributor

/assign @rdrgmnzs
/unassign @justinsb

@k8s-ci-robot k8s-ci-robot assigned rdrgmnzs and unassigned justinsb Mar 2, 2018
@chrislovecnm
Copy link
Contributor

@rocktavious #4561 fixes the verify bazel test, so please rebase

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 2, 2018
@rocktavious rocktavious force-pushed the feature/kops_cluster_name_var branch from 453c29c to 50edc6f Compare March 5, 2018 14:35
@rocktavious
Copy link
Contributor Author

@chrislovecnm - I rebased, but looks like Travis is still failing - advice?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 5, 2018
@chrislovecnm
Copy link
Contributor

/assign @robinpercy

@rdrgmnzs
Copy link
Contributor

rdrgmnzs commented Mar 5, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2018
@robinpercy
Copy link
Contributor

Thanks @rocktavious!

/lgtm

@robinpercy
Copy link
Contributor

/assign @chrislovecnm

Copy link
Contributor

@chrislovecnm chrislovecnm left a comment

Choose a reason for hiding this comment

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

Just a nitpick on the wording since we will soon have windows support. Overall looks great. Would love to see viper fully implemented as well.

cmd/kops/root.go Outdated

cmd.PersistentFlags().StringVarP(&rootCommand.clusterName, "name", "", "", "Name of cluster")
defaultClusterName := os.Getenv("KOPS_CLUSTER_NAME")
cmd.PersistentFlags().StringVarP(&rootCommand.clusterName, "name", "", defaultClusterName, "Name of cluster. Overrides $KOPS_CLUSTER_NAME")
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a nit pick, since we will soon have windows support

Overrides $KOPS_CLUSTER_NAME

Should we do

Overrides KOPS_CLUSTER_NAME environment variable

Copy link
Contributor

Choose a reason for hiding this comment

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

How does that look/sound on both environment variables?

Kyle Rockman added 3 commits March 9, 2018 10:14
- Add an environment variable to configure cluster name
- Expose envionrment variable in CLI documentation
@rocktavious rocktavious force-pushed the feature/kops_cluster_name_var branch from 772b235 to 8382cbb Compare March 9, 2018 16:21
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 9, 2018
@rocktavious
Copy link
Contributor Author

@robinpercy @chrislovecnm - Rebased on master - made the cli documentation change suggested and regenerated the documentation.

@chrislovecnm
Copy link
Contributor

/lgtm

Thanks for the PR!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrislovecnm, rdrgmnzs, robinpercy, rocktavious

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 Mar 9, 2018
@k8s-ci-robot k8s-ci-robot merged commit 0537890 into kubernetes:master Mar 9, 2018
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. needs-changes 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

6 participants