Add K8S deployment above Vagrant

Set deployment manifest files and scripts
for deploy SDC over Kubernetes inside
Vagrant
Preparation for OOM integration

Change-Id: If5d6b4131b75eb4795ce8bfd8ec228808938d40e
Issue-ID: SDC-907
Signed-off-by: Areli Fuss <af732p@att.com>
diff --git a/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh b/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
index 9a7b577..83c2950 100644
--- a/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
+++ b/sdc-os-chef/scripts/k8s/deploy_k8s_sdc.sh
@@ -12,6 +12,24 @@
   fi
 }
 
+check_pods_status()
+{ 
+    num_of_pods=$1
+    status=0
+    while [ ${status} -ne ${num_of_pods} ]
+    do 
+      status=$(sudo kubectl get pods --namespace kube-system -o json \
+      | jq -r '
+        .items[]
+        | select(.status.phase == "Running" and 
+        ([ .status.conditions[] | select(.type == "Ready" and .status == "True") ]
+        | length ) == 1 )
+        | .metadata.namespace + "/" + .metadata.name
+        ' \
+      |  wc -l )
+      sleep 3
+    done
+}
 
 # Should be removed while private dockers (maven build) will be available:
 echo "[INFO] ONAP Docker login"
@@ -22,20 +40,8 @@
 # kube-addon-manager, kube-dns, kubernetes-dashboard, storage-provisioner, tiller-deploy
 echo "[INFO] Wait for Kubernetes Service ..." 
 cd ../../kubernetes
-status=0
-while [ ${status} -ne 5 ]
-do 
-  status=$(sudo kubectl get pods --namespace kube-system -o json \
-  | jq -r '
-    .items[]
-    | select(.status.phase == "Running" and 
-    ([ .status.conditions[] | select(.type == "Ready" and .status == "True") ]
-    | length ) == 1 )
-    | .metadata.namespace + "/" + .metadata.name
-    ' \
-  |  wc -l )
-  sleep 3
-done
+
+check_pods_status 4
 
 # Create namespace 
 echo "[INFO] Check Namespace existence"
@@ -49,7 +55,7 @@
 sudo helm init
 check_status $? "Helm init"
 
-set -x
+check_pods_status 5
 
 printf "[INFO] Wait for helm to get ready\n"
 helm_health=1