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

make more of the shell pass lints #74449

Merged
merged 1 commit into from
Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion cluster/kube-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set -o errexit
set -o nounset
set -o pipefail

KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then
source "${KUBE_ROOT}/cluster/env.sh"
Expand Down Expand Up @@ -84,6 +84,7 @@ elif [[ "${validate_result}" == "2" ]]; then
fi

if [[ "${ENABLE_PROXY:-}" == "true" ]]; then
# shellcheck disable=SC1091
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the link!

I question whether this entire block is necessary

As far as I can tell, it used to be used by cluster/openstack-heat/util.sh

. /tmp/kube-proxy-env
echo ""
echo "*** Please run the following to add the kube-apiserver endpoint to your proxy white-list ***"
Expand Down
5 changes: 2 additions & 3 deletions cluster/kube-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# cluster/${KUBERNETES_PROVIDER}/util.sh where KUBERNETES_PROVIDER, if unset,
# will use its default value (gce).

KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

source "${KUBE_ROOT}/cluster/skeleton/util.sh"

Expand All @@ -34,9 +34,8 @@ fi
# this is a list of the _names_ of the variables, not the value of the
# variables. Providers can add variables to be appended to kube-env.
# (see `build-kube-env`).
PROVIDER_VARS=""

PROVIDER_UTILS="${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
if [ -f ${PROVIDER_UTILS} ]; then
if [ -f "${PROVIDER_UTILS}" ]; then
source "${PROVIDER_UTILS}"
fi
2 changes: 1 addition & 1 deletion cluster/kubectl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set -o pipefail
# echo "-=-=-=-=-=-=-=-=-=-="


KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE}")/..}
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE[0]}")/..}
source "${KUBE_ROOT}/cluster/kube-util.sh"
source "${KUBE_ROOT}/cluster/clientbin.sh"

Expand Down
3 changes: 0 additions & 3 deletions hack/.shellcheck_failures
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
./cluster/images/conformance/run_e2e.sh
./cluster/juju/prereqs/ubuntu-juju.sh
./cluster/juju/util.sh
./cluster/kube-up.sh
./cluster/kube-util.sh
./cluster/kubectl.sh
./cluster/kubemark/gce/config-default.sh
./cluster/kubemark/iks/config-default.sh
./cluster/kubemark/util.sh
Expand Down