From 98ae63e80c44f1eb6113bf1adc1f118d3f282fea Mon Sep 17 00:00:00 2001 From: Ben Coleman Date: Tue, 26 Feb 2019 11:59:58 +0000 Subject: [PATCH] v0.0.8 fixes --- Dockerfile | 2 +- README.md | 11 ++++++----- client/package.json | 2 +- client/src/App.vue | 1 + client/src/components/Viewer.vue | 9 ++++++--- kubernetes/readme.md | 5 ++++- server/package.json | 2 +- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ed33df..558b28b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN npm run build # FROM node:10-alpine -LABEL version="0.0.7" +LABEL version="0.0.8" ARG basedir="server" ENV NODE_ENV production diff --git a/README.md b/README.md index 25e22c2..7c95faa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # KubeView Kubernetes cluster visualiser and visual explorer -Shows what is happening inside a Kubernetes cluster, the objects and how they are interconnected. Data is fetched real-time from the Kubernetes API. The status of some objects (Pods, ReplicaSets, Deployments) are colour coded red/green to represent their status and health +KubeView displays what is happening inside a Kubernetes cluster, it maps out the API objects and how they are interconnected. Data is fetched real-time from the Kubernetes API. The status of some objects (Pods, ReplicaSets, Deployments) is colour coded red/green to represent their status and health The app auto refreshes and dynamically updates the view as new data comes in or changes @@ -16,14 +16,15 @@ Currently displays: **Note.** This is a work in progress ☢ +## Demo & Screenshots +### [Short video demo 🡕 ](https://www.youtube.com/watch?v=ukF6aLIUu58) + +![demo](https://user-images.githubusercontent.com/14982936/53411103-87b68a00-39bd-11e9-81b2-df2fb9cd7b28.png) + ## Application Components - **Client SPA** - Vue.js single page app. All visualisation, mapping & logic done here - **API Server** - Scrapes Kubernetes API and presents it back out as a custom REST API. Also acts as HTTP server to the SPA -### [Short video demo 🡕 ](https://www.youtube.com/watch?v=ukF6aLIUu58) - -![demo](https://user-images.githubusercontent.com/14982936/53201465-0311e780-361c-11e9-96ad-f627e903ad1a.png) - # Repo Details - [server](./server) - Source of the Node.js Express API server diff --git a/client/package.json b/client/package.json index 581bea1..62c9364 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "kubeview", - "version": "0.0.7", + "version": "0.0.8", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/client/src/App.vue b/client/src/App.vue index 8647283..a7d7d7a 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -21,6 +21,7 @@ Off + 5 secs 10 secs 15 secs diff --git a/client/src/components/Viewer.vue b/client/src/components/Viewer.vue index c738834..9de7725 100644 --- a/client/src/components/Viewer.vue +++ b/client/src/components/Viewer.vue @@ -335,10 +335,13 @@ export default { if(type == "Ingress") icon = 'ing' if(type == "PersistentVolumeClaim") icon = 'pvc' + // Trim long names for labels, and get pod's hashed generated name suffix let label = node.metadata.name.substr(0, 24) - if(type == "Pod") - label = node.metadata.labels['pod-template-hash'] || node.metadata.labels['controller-revision-hash'] || node.status.podIP || "" - + if(type == "Pod") { + let podName = node.metadata.name.replace(node.metadata.generateName, '') + label = podName || node.status.podIP || "" + } + //console.log(`### Adding: ${type} -> ${node.metadata.name || node.metadata.selfLink}`); cy.add({ data: { id: `${type}_${node.metadata.name}`, label: label, icon: icon, sourceObj: node, type: type, parent: groupId, status: status, name: node.metadata.name } }) diff --git a/kubernetes/readme.md b/kubernetes/readme.md index bd07d08..480e436 100644 --- a/kubernetes/readme.md +++ b/kubernetes/readme.md @@ -1,11 +1,14 @@ # KubeView - Deployment Manifests +These manifests deploy KuebView from public images pushed to DockerHub via the CI builds in Azure Pipelines + We assume RBAC is enabled in the cluster, so a *ServiceAccount* and custom *ClusterRole* is needed: ``` kubectl apply -f service-account.yaml ``` +(Only need to do this once!) -To deploy: +To deploy the app: ``` kubectl apply -f deploy.yaml ``` diff --git a/server/package.json b/server/package.json index 41214ab..ce0a334 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "kubeview-server", - "version": "0.0.7", + "version": "0.0.8", "description": "API server for KubeView, scrapes/proxies Kubernetes API", "main": "server.js", "scripts": {