morpheyesh commented on a change in pull request #233:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/233#discussion_r581193361



##########
File path: scripts/run-e2e-tests.sh
##########
@@ -75,18 +75,35 @@ function install_cluster() {
 
   # install kubectl
   echo "step 3/6: installing kubectl"
-  stable_release=$(curl -s 
https://storage.googleapis.com/kubernetes-release/release/stable.txt)
-  exit_on_error "unable to retrieve latest stable version of kubectl"
-  curl -LO 
https://storage.googleapis.com/kubernetes-release/release/${stable_release}/bin/linux/amd64/kubectl
 \
-    && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
-  exit_on_error "install kubectl failed"
+
+  if [[ "$OSTYPE" == "linux-gnu"* ]]; then
+    echo "Installing Kubectl for Linux.."
+          stable_release=$(curl -s 
https://storage.googleapis.com/kubernetes-release/release/stable.txt)
+          exit_on_error "unable to retrieve latest stable version of kubectl"
+          curl -LO 
https://storage.googleapis.com/kubernetes-release/release/${stable_release}/bin/linux/amd64/kubectl
 \
+          && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
+          exit_on_error "install kubectl failed"
+  elif [[ "$OSTYPE" == "darwin"* ]]; then
+    echo "Installing Kubectl for Mac.."
+              curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl" \
+              && chmod +x kubectl && sudo mv kubectl /usr/local/bin
+  fi
+
 
   # install KIND
   echo "step 4/6: installing kind"
-  curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.8.0/kind-linux-amd64"; \
-    && chmod +x ./kind && mv ./kind $(go env GOPATH)/bin
-  exit_on_error "install KIND failed"
-  check_cmd "kind"
+
+  if [[ "$OSTYPE" == "linux-gnu"* ]]; then
+    echo "Installing KIND for Linux.."
+         curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.8.0/kind-linux-amd64"; 
\
+            && chmod +x ./kind && mv ./kind $(go env GOPATH)/bin
+         exit_on_error "install KIND failed"
+         check_cmd "kind"
+  elif [[ "$OSTYPE" == "darwin"* ]]; then
+    echo "Installing KIND for Mac.."
+       curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.10.0/kind-darwin-amd64"; 
\

Review comment:
       Yep. 0.10.0 for both.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to