Skip to content

Commit

Permalink
support clusterIP and hide managed fields
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-uk committed Oct 31, 2021
1 parent b101254 commit a00a7d9
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 31 deletions.
18 changes: 11 additions & 7 deletions charts/example-values.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
#
# If true install in single namespace mode
#
# ==============================================================
# Example YAML values for typical kubeview deployment scenarios
# ==============================================================

# If true the app will function in single namespace mode
limitNamespace: false

# Networking - expose using an ingress
# Note. If both ingress and loadbalancer are disabled, an internal ClusterIP service will be created
ingress:
enabled: false
# className: nginx
# hosts:
# - host: kubeview.example.net
# paths:
# - /
# tls:
# - secretName: my-cert
# hosts:
# - kubeview.example.net

# Networking - expose using simple load balancer
loadBalancer:
enabled: true

IP: '1.2.3.4'
# If you have an existing IP you can set it here
# IP: "1.2.3.4"
4 changes: 2 additions & 2 deletions charts/kubeview/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: kubeview
apiVersion: v2
version: 0.1.30
appVersion: '0.1.30'
version: 0.1.31
appVersion: "0.1.31"

description: Kubernetes cluster visualiser and visual explorer
maintainers:
Expand Down
18 changes: 11 additions & 7 deletions charts/kubeview/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,31 @@ replicaCount: 1

image:
repository: ghcr.io/benc-uk/kubeview
tag: 0.1.30
tag: 0.1.31
pullPolicy: Always

imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
nameOverride: ""
fullnameOverride: ""

# If you want to expose the kubeview service using an ingress
ingress:
enabled: false
annotations: {}
hosts:
- host: chart-example.local
paths: ['/']
tls: []
className:
className: ""

# If you want to expose the kubeview service directly
loadBalancer:
IP: ''

IP: ""
enabled: true

# Note.
# If both ingress and loadbalancer are disabled, a ClusterIP service will be created

# Mostly never need to change these
resources:
limits:
cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Variables
SERVER_DIR := ./cmd
FRONTEND_DIR := ./web/client
VERSION := 0.1.30
VERSION := 0.1.31
BUILD_INFO := Manual build from makefile
# Things you don't want to change
REPO_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
Expand Down
18 changes: 9 additions & 9 deletions web/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion web/client/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "kubeview",
"version": "0.1.30",
"version": "0.1.31",
"author": {
"name": "Ben Coleman"
},
"private": true,
"scripts": {
"start": "npm run serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint-fix": "vue-cli-service lint && prettier --write src",
Expand Down
1 change: 0 additions & 1 deletion web/client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<b-navbar-nav>
<b-dropdown split :text="autoRefreshText" split-variant="light" variant="info">
<b-dropdown-item @click="autoRefresh = 0"> Off </b-dropdown-item>
<!-- <b-dropdown-item @click="autoRefresh=2">2 secs</b-dropdown-item> -->
<b-dropdown-item @click="autoRefresh = 5"> 5 secs </b-dropdown-item>
<b-dropdown-item @click="autoRefresh = 10"> 10 secs </b-dropdown-item>
<b-dropdown-item @click="autoRefresh = 15"> 15 secs </b-dropdown-item>
Expand Down
2 changes: 1 addition & 1 deletion web/client/src/components/InfoBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</ul>
</div>

<b-button variant="info" @click="$emit('full-info', nodeData)"> Full Object Details </b-button>
<b-button variant="info" @click="$emit('show-full-info', nodeData)"> Full Object Details </b-button>
</b-card>
</div>
</template>
Expand Down
7 changes: 5 additions & 2 deletions web/client/src/components/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<loading v-if="loading" />

<transition name="slide-fade">
<infobox v-if="infoBoxData" :node-data="infoBoxData" @hide-info-box="infoBoxData = null" @full-info="showFullInfo" />
<infobox v-if="infoBoxData" :node-data="infoBoxData" @hide-info-box="infoBoxData = null" @show-full-info="showFullInfo" />
</transition>

<b-modal ref="fullInfoModal" centered :title="fullInfoTitle" ok-only scrollable size="lg" body-class="fullInfoBody">
Expand Down Expand Up @@ -145,7 +145,10 @@ export default {
// Display the detail info dialog with YAML version of the selected object
//
showFullInfo() {
this.fullInfoYaml = yaml.safeDump(this.infoBoxData.sourceObj)
let objectCopy = { ...this.infoBoxData.sourceObj }
// Hide managedFields as it is not useful and noisy
objectCopy.metadata.managedFields = {}
this.fullInfoYaml = yaml.safeDump(objectCopy)
this.fullInfoTitle = `${this.infoBoxData.type}: ${this.infoBoxData.sourceObj.metadata.name}`
this.$refs.fullInfoModal.show()
},
Expand Down

0 comments on commit a00a7d9

Please sign in to comment.