Skip to content

Conversation

danielqsj
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

fix shellcheck failures in cluster/local

Which issue(s) this PR fixes:

work towards #72956

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 24, 2019
@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 24, 2019
@danielqsj
Copy link
Contributor Author

@BenTheElder @jbeda if you have time, can you help review this? Thanks

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm
thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2019
@BenTheElder
Copy link
Member

/assign @dims

@nikhita
Copy link
Member

nikhita commented Feb 15, 2019

/retest

@dims ping for approval

KUBE_MASTER=localhost
KUBE_MASTER_IP=127.0.0.1
KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080"
export KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080"
Copy link
Member

Choose a reason for hiding this comment

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

hmm why do we need to export?

Copy link
Member

Choose a reason for hiding this comment

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

IIRC this is sourced and then this env is read by other scripts because :cluster/:. not 100% though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if KUBE_MASTER_URL is needed by other scripts, shellcheck suggest we export it. Otherwise we can remove this env if it's safe.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, hack/ginkgo-e2e.sh should read this env from cluster/loca/util.sh for local provider case like
KUBE_MASTER_URL="${KUBE_MASTER_URL:-https://${KUBE_MASTER_IP:-}}" but it cannot do that at this time and hack/ginkgo-e2e.sh uses a hard-coded default value.
It seems nice to add export for this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment to the above function explaining what it requires, sets and exports? eg:

# Detect the IP for the master
#
# Vars set:
#   KUBE_MASTER
#   KUBE_MASTER_IP
# Vars exported:
#   KUBE_MASTER_URL
function detect-master {

It may seem redundant but it helps us know this is on purpose, and it's the same style used in cluster/gce

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@spiffxp sure, PR updated, PTAL

@oomichi
Copy link
Member

oomichi commented Feb 20, 2019

/cc @oomichi

@k8s-ci-robot k8s-ci-robot requested a review from oomichi February 20, 2019 19:53
Copy link
Contributor

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

one nit

KUBE_MASTER=localhost
KUBE_MASTER_IP=127.0.0.1
KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080"
export KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment to the above function explaining what it requires, sets and exports? eg:

# Detect the IP for the master
#
# Vars set:
#   KUBE_MASTER
#   KUBE_MASTER_IP
# Vars exported:
#   KUBE_MASTER_URL
function detect-master {

It may seem redundant but it helps us know this is on purpose, and it's the same style used in cluster/gce

@spiffxp
Copy link
Contributor

spiffxp commented Feb 23, 2019

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 23, 2019
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 24, 2019
Copy link
Member

@BenTheElder BenTheElder 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 24, 2019
@oomichi
Copy link
Member

oomichi commented Feb 25, 2019

/test pull-kubernetes-integration

Copy link
Contributor

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, danielqsj, spiffxp

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 Feb 25, 2019
@k8s-ci-robot k8s-ci-robot merged commit f288678 into kubernetes:master Feb 25, 2019
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. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants