From 450d93f38b4a9870ea92839e2c287ebc2e11ae00 Mon Sep 17 00:00:00 2001 From: Rimas Mocevicius Date: Wed, 11 Jan 2017 10:19:43 +0000 Subject: [PATCH] V1.0.3 (#168) * v1.0.3 * v1.0.3 --- src/Kube-Solo/Kube-Solo-Info.plist | 4 +- src/functions.sh | 22 +++++--- src/k8s/add-ons/heapster.yaml | 91 ++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 src/k8s/add-ons/heapster.yaml diff --git a/src/Kube-Solo/Kube-Solo-Info.plist b/src/Kube-Solo/Kube-Solo-Info.plist index 27d2390..5d42d66 100644 --- a/src/Kube-Solo/Kube-Solo-Info.plist +++ b/src/Kube-Solo/Kube-Solo-Info.plist @@ -19,11 +19,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0.2 + 1.0.3 CFBundleSignature ???? CFBundleVersion - 321 + 323 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/src/functions.sh b/src/functions.sh index e56a4d9..a466fc1 100755 --- a/src/functions.sh +++ b/src/functions.sh @@ -260,6 +260,15 @@ fi function download_osx_clients() { +# get VM's IP +vm_ip=$(~/bin/corectl q -i k8solo-01) +# Set the shell environment variables +# set kubernetes master endpoint +export KUBERNETES_MASTER=http://$vm_ip:8080 +# set kubernetes cluster config file path for Helm +export KUBECONFIG=~/kube-solo/kube/kubeconfig +export HELM_HOST=$vm_ip:32767 + # get lastest macOS helm cli version echo " " echo "Checking for latest Helm version..." @@ -289,14 +298,6 @@ else echo " " echo "Installed latest ${LATEST_HELM} of 'helm' cli to ~/kube-solo/bin ..." echo " " - # get VM's IP - vm_ip=$(~/bin/corectl q -i k8solo-01) - # Set the shell environment variables - # set kubernetes master endpoint - export KUBERNETES_MASTER=http://$vm_ip:8080 - # set kubernetes cluster config file path for Helm - export KUBECONFIG=~/kube-solo/kube/kubeconfig - export HELM_HOST=$vm_ip:32767 echo "Installing new version of Helm Tiller..." kubectl --namespace=kube-system delete deployment tiller-deploy > /dev/null 2>&1 ~/kube-solo/bin/helm init @@ -520,6 +521,10 @@ echo "Installing SkyDNS ..." ~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/skydns-svc.yaml # echo " " +echo "Installing Heapster ..." +~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/heapster.yaml +# +echo " " echo "Installing Kubernetes Dashboard ..." ~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/dashboard-service.yaml ~/kube-solo/bin/kubectl create -f ~/kube-solo/kubernetes/dashboard-controller.yaml @@ -534,6 +539,7 @@ sleep 1 rm -f ~/kube-solo/kubernetes/kube-system-ns.yaml rm -f ~/kube-solo/kubernetes/skydns-rc.yaml rm -f ~/kube-solo/kubernetes/skydns-svc.yaml +rm -f ~/kube-solo/kubernetes/heapster.yaml rm -f ~/kube-solo/kubernetes/dashboard-controller.yaml rm -f ~/kube-solo/kubernetes/dashboard-service.yaml rm -f ~/kube-solo/kubernetes/tiller-deploy-service.yaml diff --git a/src/k8s/add-ons/heapster.yaml b/src/k8s/add-ons/heapster.yaml new file mode 100644 index 0000000..ace746f --- /dev/null +++ b/src/k8s/add-ons/heapster.yaml @@ -0,0 +1,91 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: heapster + namespace: kube-system + labels: + k8s-addon: monitoring-standalone.addons.k8s.io + k8s-app: heapster + kubernetes.io/cluster-service: "true" + version: v1.2.0 +spec: + replicas: 1 + selector: + matchLabels: + k8s-app: heapster + version: v1.2.0 + template: + metadata: + labels: + k8s-app: heapster + version: v1.2.0 + annotations: + scheduler.alpha.kubernetes.io/critical-pod: '' + scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' + spec: + containers: + - image: gcr.io/google_containers/heapster:v1.2.0 + name: heapster + livenessProbe: + httpGet: + path: /healthz + port: 8082 + scheme: HTTP + initialDelaySeconds: 180 + timeoutSeconds: 5 + resources: + # keep request = limit to keep this container in guaranteed class + limits: + cpu: 100m + memory: 300Mi + requests: + cpu: 100m + memory: 300Mi + command: + - /heapster + - --source=kubernetes.summary_api:'' + - image: gcr.io/google_containers/addon-resizer:1.6 + name: heapster-nanny + resources: + limits: + cpu: 50m + memory: 100Mi + requests: + cpu: 50m + memory: 100Mi + env: + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + command: + - /pod_nanny + - --cpu=80m + - --extra-cpu=0.5m + - --memory=140Mi + - --extra-memory=4Mi + - --threshold=5 + - --deployment=heapster + - --container=heapster + - --poll-period=300000 + - --estimator=exponential +--- +apiVersion: v1 +kind: Service +metadata: + name: heapster + namespace: kube-system + labels: + k8s-addon: monitoring-standalone.addons.k8s.io + kubernetes.io/name: "Heapster" + kubernetes.io/cluster-service: "true" +spec: + ports: + - port: 80 + targetPort: 8082 + selector: + k8s-app: heapster