mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Log Project (GKE) less and cleanup bash indentation
This commit is contained in:
parent
b3835665ee
commit
fcb4e5e204
@ -51,14 +51,13 @@ function detect-project() {
|
|||||||
echo "... in detect-project()" >&2
|
echo "... in detect-project()" >&2
|
||||||
if [[ -z "${PROJECT:-}" ]]; then
|
if [[ -z "${PROJECT:-}" ]]; then
|
||||||
export PROJECT=$("${GCLOUD}" config list project | tail -n 1 | cut -f 3 -d ' ')
|
export PROJECT=$("${GCLOUD}" config list project | tail -n 1 | cut -f 3 -d ' ')
|
||||||
|
echo "... Using project: ${PROJECT}" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${PROJECT:-}" ]]; then
|
if [[ -z "${PROJECT:-}" ]]; then
|
||||||
echo "Could not detect Google Cloud Platform project. Set the default project using " >&2
|
echo "Could not detect Google Cloud Platform project. Set the default project using " >&2
|
||||||
echo "'gcloud config set project <PROJECT>'" >&2
|
echo "'gcloud config set project <PROJECT>'" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Project: ${PROJECT}" >&2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Execute prior to running tests to build a release if required for env.
|
# Execute prior to running tests to build a release if required for env.
|
||||||
@ -121,7 +120,7 @@ function kube-up() {
|
|||||||
echo "Creating new network: ${NETWORK}" >&2
|
echo "Creating new network: ${NETWORK}" >&2
|
||||||
"${GCLOUD}" compute networks create "${NETWORK}" --project="${PROJECT}" --range "${NETWORK_RANGE}"
|
"${GCLOUD}" compute networks create "${NETWORK}" --project="${PROJECT}" --range "${NETWORK_RANGE}"
|
||||||
else
|
else
|
||||||
echo "Using network: ${NETWORK}" >&2
|
echo "... Using network: ${NETWORK}" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Allow SSH on all nodes in the network. This doesn't actually check whether
|
# Allow SSH on all nodes in the network. This doesn't actually check whether
|
||||||
@ -134,7 +133,7 @@ function kube-up() {
|
|||||||
--project="${PROJECT}" \
|
--project="${PROJECT}" \
|
||||||
--source-ranges="0.0.0.0/0"
|
--source-ranges="0.0.0.0/0"
|
||||||
else
|
else
|
||||||
echo "Using firewall-rule: ${FIREWALL_SSH}" >&2
|
echo "... Using firewall-rule: ${FIREWALL_SSH}" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local create_args=(
|
local create_args=(
|
||||||
|
@ -28,7 +28,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
|||||||
source "${KUBE_ROOT}/cluster/kube-env.sh"
|
source "${KUBE_ROOT}/cluster/kube-env.sh"
|
||||||
source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
|
source "${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
|
||||||
|
|
||||||
echo "Starting cluster using provider: $KUBERNETES_PROVIDER" >&2
|
echo "... Starting cluster using provider: $KUBERNETES_PROVIDER" >&2
|
||||||
|
|
||||||
echo "... calling verify-prereqs" >&2
|
echo "... calling verify-prereqs" >&2
|
||||||
verify-prereqs
|
verify-prereqs
|
||||||
@ -36,7 +36,7 @@ verify-prereqs
|
|||||||
echo "... calling kube-up" >&2
|
echo "... calling kube-up" >&2
|
||||||
kube-up
|
kube-up
|
||||||
|
|
||||||
echo "... calling validate-cluster" >&2
|
echo "... calling validate-cluster.sh" >&2
|
||||||
"${KUBE_ROOT}/cluster/validate-cluster.sh"
|
"${KUBE_ROOT}/cluster/validate-cluster.sh"
|
||||||
|
|
||||||
echo -e "Done, listing cluster services:\n" >&2
|
echo -e "Done, listing cluster services:\n" >&2
|
||||||
|
Loading…
Reference in New Issue
Block a user