Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cf-deploy-kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ else
fi

#check the cluster version and decide which version of kubectl to use:
SERVER_VERSION=$(kubectl version --short=true --context "${KUBECONTEXT}" | grep -i server | cut -c18-20 | tr -d .)

if (( "$SERVER_VERSION" <= "16" )); then mv /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl; fi 2>/dev/null
SERVER_VERSION=$(kubectl version --short=true --context "${KUBECONTEXT}" | grep -i server | cut -d ':' -f2 | cut -d '.' -f2 | sed 's/[^0-9]*//g')
echo "Server minor version: $SERVER_VERSION"
if (( "$SERVER_VERSION" <= "6" )); then mv /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl; fi 2>/dev/null


[ ! -f "${deployment_file}" ] && echo "Couldn't find $deployment_file file at $(pwd)" && exit 1;
Expand Down