├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── buildDocker.sh ├── lib ├── afterParse.js ├── appRoutes.js ├── clientIO.js ├── compare.js ├── documentation.js ├── fileio.js ├── hierarchy.js ├── kube.js ├── labels.js ├── ownerRef.js ├── parseBinding.js ├── parseCRD.js ├── parseCSI.js ├── parseContainer.js ├── parseControllerRevision.js ├── parseEndpointSlice.js ├── parseEndpoints.js ├── parseEvent.js ├── parseGeneric.js ├── parseHPA.js ├── parseNode.js ├── parseNodeSelector.js ├── parsePersistentVolume.js ├── parsePersistentVolumeClaim.js ├── parseRole.js ├── parseRoleBinding.js ├── parseSecret.js ├── parseService.js ├── parseServiceAccount.js ├── parseStorageClass.js ├── parseVolume.js ├── parseVolumeAttachment.js ├── parseVolumeClaimTemplate.js ├── parseWorkload.js ├── search.js ├── security.js ├── snapshot.js ├── splash.js ├── storage.js ├── svgSchematic.js ├── utl.js ├── vpk.js ├── vpkReset.js └── xreference.js ├── package.json ├── public ├── ace │ ├── .DS_Store │ ├── ace.js │ ├── ext-error_marker.js │ ├── ext-keybinding_menu.js │ ├── ext-language_tools.js │ ├── ext-modelist.js │ ├── ext-options.js │ ├── ext-prompt.js │ ├── ext-searchbox.js │ ├── ext-themelist.js │ ├── mode-yaml.js │ ├── snippets │ │ ├── .DS_Store │ │ └── yaml.js │ ├── theme-monokai.js │ ├── theme-solarized_light.js │ └── theme-sqlserver.js ├── docs │ ├── .DS_Store │ ├── cluster.md │ ├── comparesnap.md │ ├── docimages │ │ ├── 3dView.png │ │ ├── about.png │ │ ├── architecture.png │ │ ├── attribution.png │ │ ├── caroArchitecture.png │ │ ├── caroGraphs.png │ │ ├── caroOther.png │ │ ├── caroRoleBinding.png │ │ ├── caroSchematic.png │ │ ├── circlePack.png │ │ ├── clusterTP.png │ │ ├── clusterTypeDataSource.png │ │ ├── compareResults.png │ │ ├── compareSideBySide.png │ │ ├── connectedDataSource.png │ │ ├── dataSourceDropDown.png │ │ ├── decode.png │ │ ├── existingKubeDataSource.png │ │ ├── gettingStartedTP.png │ │ ├── graphicsViewTP.png │ │ ├── heirarchy.png │ │ ├── helpInfoConfigTP.png │ │ ├── overviewTP.png │ │ ├── ownerRefLinksTP.png │ │ ├── previousDataSource.png │ │ ├── rbacDefs.png │ │ ├── rbacUsage.png │ │ ├── roleBindings.png │ │ ├── schematic.png │ │ ├── schematicsTP.png │ │ ├── securityTP.png │ │ ├── selectDataSource.png │ │ ├── server.png │ │ ├── snapshotClusterInfo.png │ │ ├── snapshotDone.png │ │ ├── snapshotName.png │ │ ├── snapshotStatsKind.png │ │ ├── snapshotStatsNS.png │ │ ├── snapshotTP.png │ │ ├── statsDataSource.png │ │ ├── storageTP.png │ │ ├── tableOptions.png │ │ ├── tableViewTP.png │ │ ├── tableview.png │ │ ├── thumbnail.png │ │ ├── userInterfaceClickIt.png │ │ ├── userInterfaceTP.png │ │ ├── videoComingSoon.png │ │ ├── videoGettingStarted.png │ │ ├── vpk.png │ │ ├── xrefTP.png │ │ ├── xrefs.png │ │ └── yamlEditor.png │ ├── generalusage.md │ ├── gettingstarted.md │ ├── graphicview.md │ ├── overview.md │ ├── ownerref.md │ ├── schematics.md │ ├── security.md │ ├── snapshot.md │ ├── storage.md │ ├── tableview.md │ ├── toc.md │ └── xreference.md ├── images │ ├── clouds.jpg │ ├── k8-flip.png │ ├── k8 │ │ ├── api.svg │ │ ├── c-c-m.svg │ │ ├── c-m.svg │ │ ├── c-rev-orig.svg │ │ ├── c-rev.svg │ │ ├── c-role.svg │ │ ├── cm.svg │ │ ├── control-plane.svg │ │ ├── crb.svg │ │ ├── crd.svg │ │ ├── cronjob.svg │ │ ├── csinode.svg │ │ ├── deploy.svg │ │ ├── ds.svg │ │ ├── ep.svg │ │ ├── eps.svg │ │ ├── etcd.svg │ │ ├── evt.svg │ │ ├── group.svg │ │ ├── hpa.svg │ │ ├── ing.svg │ │ ├── job.svg │ │ ├── k-proxy.svg │ │ ├── k8.svg │ │ ├── kubelet.svg │ │ ├── limits.svg │ │ ├── master.svg │ │ ├── netpol.svg │ │ ├── node.svg │ │ ├── ns.svg │ │ ├── pod.svg │ │ ├── psp.svg │ │ ├── pv.svg │ │ ├── pvc.svg │ │ ├── quota.svg │ │ ├── rb.svg │ │ ├── rc.svg │ │ ├── role.svg │ │ ├── rs.svg │ │ ├── sa.svg │ │ ├── sc.svg │ │ ├── sched.svg │ │ ├── secret.svg │ │ ├── security.svg │ │ ├── sts.svg │ │ ├── subjects.svg │ │ ├── svc.svg │ │ ├── user.svg │ │ ├── vol.svg │ │ └── volumeattachment.svg │ ├── loading.gif │ ├── other │ │ ├── ceph.svg │ │ ├── coreDNS.svg │ │ ├── coreDNS2.svg │ │ ├── fluentd.svg │ │ ├── helm.svg │ │ ├── ibm.svg │ │ ├── ibmold.svg │ │ ├── kong.svg │ │ ├── launch-box.svg │ │ ├── ocp.svg │ │ ├── rancher.svg │ │ ├── redhat.svg │ │ ├── rook.svg │ │ ├── rook2.svg │ │ ├── unk.svg │ │ ├── uparrow.svg │ │ └── vpk.png │ ├── stars.jpg │ ├── vpk-flip.gif │ ├── vpk-flip.png │ ├── vpk.png │ └── wow │ │ ├── pic-cluster.png │ │ ├── pic-comparesnapshots.png │ │ ├── pic-graphic.png │ │ ├── pic-ownerref.png │ │ ├── pic-schematic.png │ │ ├── pic-security.png │ │ ├── pic-storage.png │ │ ├── pic-tableview.png │ │ ├── wow-3dview.gif │ │ ├── wow-compare.gif │ │ ├── wow-graphics.gif │ │ ├── wow-rbac.gif │ │ ├── wow-schematic.gif │ │ └── wow-storage.gif ├── javascript │ ├── 3rdparty │ │ ├── babylon.js │ │ ├── bootstrap-table.min.js │ │ ├── bootstrap-toggle.min.js │ │ ├── bootstrap.min.js │ │ ├── d3-graphviz.js │ │ ├── d3-graphviz.js.map │ │ ├── d3.v7.min.js │ │ ├── fontawesome-f62fcc73b5.js │ │ ├── graphviz.js │ │ ├── graphviz.js.map │ │ ├── graphvizlib.wasm │ │ ├── index.js │ │ ├── index.js.map │ │ ├── jquery-3.4.1.min.js │ │ ├── jspdf.min.js │ │ ├── jspdf.plugin.autotable.js │ │ ├── popper.min.js │ │ ├── popper.min.js.map │ │ ├── select2.min.4.1.0.js │ │ └── tableExport.min.js │ ├── chartCirclePack.js │ ├── chartCollapsible.js │ ├── chartHierarchy.js │ ├── extensions │ │ ├── export │ │ │ ├── bootstrap-table-export.js │ │ │ └── bootstrap-table-export.min.js │ │ └── print │ │ │ ├── bootstrap-table-print.js │ │ │ └── bootstrap-table-print.min.js │ ├── junk.js │ ├── socket.io.js │ ├── vpk3dCluster.js │ ├── vpk3dCommon.js │ ├── vpk3dData.js │ ├── vpk3dFilter.js │ ├── vpkCluster.js │ ├── vpkCluster3D.js │ ├── vpkCommon.js │ ├── vpkCompare.js │ ├── vpkEdit.js │ ├── vpkGetDefs.js │ ├── vpkMain.js │ ├── vpkModalHandlers.js │ ├── vpkOwnerRefsLinks.js │ ├── vpkSchematic.js │ ├── vpkSecGraph.js │ ├── vpkSelectLists.js │ └── vpkStorage.js ├── routes │ └── index.js ├── sounds │ ├── GunShot.wav │ └── LowDing.wav ├── stylesheets │ ├── all.min.css │ ├── bootstrap-select.css │ ├── bootstrap-table.min.css │ ├── bootstrap-toggle.min.css │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ ├── select2.min.4.1.0.css │ ├── vpk.css │ └── vpk3D.css ├── textures │ ├── clouds_nx.jpg │ ├── clouds_ny.jpg │ ├── clouds_nz.jpg │ ├── clouds_px.jpg │ ├── clouds_py.jpg │ ├── clouds_pz.jpg │ ├── stars_nx.jpg │ ├── stars_ny.jpg │ ├── stars_nz.jpg │ ├── stars_px.jpg │ ├── stars_py.jpg │ └── stars_pz.jpg ├── views │ ├── index.ejs │ └── partials │ │ ├── carousel.ejs │ │ ├── head.ejs │ │ ├── modals.ejs │ │ ├── scripts.ejs │ │ └── xrefModal.ejs └── webfonts │ ├── fa-brands-400.eot │ ├── fa-brands-400.svg │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.eot │ ├── fa-regular-400.svg │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.eot │ ├── fa-solid-900.svg │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ └── fa-solid-900.woff2 ├── server.js ├── testing ├── buildHeadlamp.yaml ├── buildIngress.yaml ├── buildKongIngress.yaml ├── buildNginx.yaml ├── buildVolumeSnapShot.yaml ├── headlamp-ingress.yaml ├── kind-with-cluster-level-baseline-pod-security.sh ├── kind-with-four-nodes.yaml ├── volumeSnapshot-pvc.yaml ├── volumeSnapshot.yaml └── volumeSnapshotRestore-pvc.yaml ├── userconfig └── userconfig.json └── vpkconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | #==== Directories and Files to exclude ==== 2 | 3 | # VpK created runtime directories 4 | cluster/* 5 | usage/* 6 | userconfig.json 7 | 8 | # Node packages and other libs 9 | node_modules/* 10 | 11 | # Optional npm cache directory 12 | .npm 13 | 14 | # Optional REPL history 15 | .node_repl_history 16 | 17 | # VSCode 18 | .vscode/* 19 | 20 | # eslint 21 | .eslintrc.js 22 | 23 | # Logs 24 | logs 25 | *.log 26 | npm-debug.log* 27 | 28 | # node package 29 | package-lock.json 30 | 31 | # DS_Store 32 | .DS_Store 33 | public/.DS_Store 34 | public/docs/.DS_Store 35 | public/docs/docimages/.DS_Store 36 | public/images/.DS_Store 37 | 38 | 39 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | #FROM mhart/alpine-node:16 2 | FROM node:18.10.0 3 | LABEL maintainer="k8debug" 4 | 5 | RUN mkdir /vpk 6 | RUN mkdir /vpk/cluster 7 | RUN mkdir /vpk/usage 8 | RUN mkdir /vpk/userconfig 9 | 10 | WORKDIR /vpk 11 | COPY lib/ ./lib 12 | COPY public/ ./public 13 | COPY userconfig/ ./userconfig 14 | COPY server.js . 15 | COPY vpkconfig.json . 16 | COPY package.json . 17 | COPY LICENSE . 18 | 19 | RUN apt-get install -y curl \ 20 | && npm install \ 21 | && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ 22 | && install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl 23 | 24 | CMD ["sh", "-c", "node server.js -c yes"] 25 | EXPOSE 4200/tcp 26 | 27 | #docker run -it k8debug/vpk sh 28 | #docker run -v /Users/bob/snaptest/:/vpk/cluster -v /Users/bob/userconfig/:/vpk/userconfig -p 4500:4200 k8debug/vpk 29 | #docker tag k8debug/vpk:5.2.0 k8debug/vpk:latest -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2022 K8Debug 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /buildDocker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DASH="============================================================================================================================" 3 | echo " " 4 | echo $DASH 5 | echo " Build and Push image to repository" 6 | 7 | # check if image name is provided 8 | if [ -z "$1" ]; then 9 | echo " " 10 | echo "ERROR: image name is required " 11 | echo " " 12 | echo " Usage: build_push [image name] [tag] [repository/namespace] " 13 | echo " " 14 | echo " Parameters:" 15 | echo " --- NAME --- -REQ/OPT- --------- DESCRIPTION --------- -- DEFAULT VALUE --" 16 | echo " [image name] Required Name of the image to be created N/A" 17 | echo " [tag] Optional Tag to label the image latest" 18 | echo " [repository] Optional Target image repository docker.io/dweilert" 19 | echo " " 20 | echo $DASH 21 | echo " " 22 | exit 1 23 | else 24 | IMG=$1 25 | echo " Using provided image name : $IMG" 26 | fi 27 | 28 | 29 | # check if tag is provided 30 | if [ -z "$2" ]; then 31 | TAG="latest" 32 | echo " Using default tag : $TAG" 33 | else 34 | TAG=$2 35 | echo " Using provided tag : $TAG" 36 | fi 37 | 38 | 39 | 40 | # default target docker repository 41 | if [ -z "$3" ]; then 42 | TR="docker.io/k8debug" 43 | echo " Using default image repository : $TR" 44 | else 45 | TR=$3 46 | echo " Using provided image repository: $TR" 47 | fi 48 | 49 | echo $DASH 50 | echo " " 51 | docker build -t ${TR}/${IMG}:${TAG} . 52 | docker push ${TR}/${IMG}:${TAG} 53 | echo " " 54 | echo $DASH 55 | echo " " 56 | 57 | -------------------------------------------------------------------------------- /lib/labels.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Called from fileio.js to process labels; 22 | */ 23 | 24 | 'use strict'; 25 | 26 | var vpk = require('../lib/vpk'); 27 | var utl = require('../lib/utl'); 28 | 29 | //------------------------------------------------------------------------------ 30 | // common routines 31 | //------------------------------------------------------------------------------ 32 | module.exports = { 33 | 34 | //------------------------------------------------------------------------------ 35 | // metadata.labels 36 | // spec.template.metadata.labels 37 | //------------------------------------------------------------------------------ 38 | 39 | //------------------------------------------------------------------------------ 40 | checkLabels: function (ns, kind, name, metadata, fnum) { 41 | try { 42 | // grab labels if they exist 43 | if (typeof metadata !== 'undefined') { 44 | if (typeof metadata.labels !== 'undefined') { 45 | for (var key in metadata.labels) { 46 | var value = metadata.labels[key]; 47 | var labelKey = ns + '.' + kind + '.' + key + '.' + value; 48 | utl.checkLabel(key, value, fnum) 49 | utl.checkType(kind, labelKey); 50 | var tmp = vpk[kind][labelKey]; 51 | var item = { 52 | 'namespace': ns, 53 | 'kind': kind, 54 | 'objName': name, 55 | 'key': key, 56 | 'value': value, 57 | 'fnum': fnum 58 | }; 59 | tmp.push(item); 60 | vpk[kind][labelKey] = tmp; 61 | } 62 | } 63 | } 64 | } catch (err) { 65 | utl.logMsg('vpkLBL555 - Error processing file fnum: ' + fnum + ' message: ' + err); 66 | utl.logMsg('vpkLBL555 - Stack: ' + err.stack); 67 | } 68 | }, 69 | 70 | //------------------------------------------------------------------------------ 71 | // spec.selector.matchLabels 72 | //------------------------------------------------------------------------------ 73 | checkMatchLabels: function (ns, kind, name, matchLabels, fnum) { 74 | 75 | try { 76 | // grab matchLabels if they exist 77 | if (typeof matchLabels !== 'undefined') { 78 | for (var key in matchLabels) { 79 | var value = matchLabels[key]; 80 | var labelKey = ns + '.' + kind + '.' + key + '.' + value; 81 | utl.checkType(kind, labelKey); 82 | var tmp = vpk[kind][labelKey]; 83 | var item = { 84 | 'namespace': ns, 85 | 'kind': kind, 86 | 'objName': name, 87 | 'key': key, 88 | 'value': value, 89 | 'fnum': fnum 90 | }; 91 | tmp.push(item); 92 | vpk[kind][labelKey] = tmp; 93 | } 94 | } 95 | } catch (err) { 96 | utl.logMsg('vpkLBL557 - Error processing file fnum: ' + fnum + ' message: ' + err); 97 | utl.logMsg('vpkLBL557 - Stack: ' + err.stack); 98 | } 99 | } 100 | 101 | //end of export 102 | }; -------------------------------------------------------------------------------- /lib/parseCRD.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse the custom resource definition 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseCRD = function (ns, kind, name, obj, fnum) { 29 | try { 30 | if (typeof obj.spec !== 'undefined') { 31 | if (typeof obj.spec.names !== 'undefined') { 32 | if (typeof obj.spec.names.kind !== 'undefined') { 33 | 34 | if (typeof vpk.crds[obj.spec.names.kind] === 'undefined') { 35 | vpk.crds[obj.spec.names.kind] = []; 36 | } 37 | vpk.crds[obj.spec.names.kind].push({ 38 | 39 | 'fnum': fnum, 40 | 'name': name, 41 | 'crdKind': obj.spec.names.kind, 42 | 'crdScope': obj.spec.names.scope, 43 | 'namespace': ns 44 | }); 45 | } 46 | } 47 | } 48 | } catch (err) { 49 | utl.logMsg('vpkCRD001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 50 | utl.logMsg('vpkCRD001 - Stack: ' + err.stack); 51 | } 52 | }; 53 | 54 | //------------------------------------------------------------------------------ 55 | // common routines 56 | //------------------------------------------------------------------------------ 57 | module.exports = { 58 | parse: function (ns, kind, name, obj, fnum) { 59 | parseCRD(ns, kind, name, obj, fnum); 60 | } 61 | }; -------------------------------------------------------------------------------- /lib/parseCSI.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse the CSINode and CSIDriver 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseCSI = function (kind, name, obj, fnum) { 29 | 30 | try { 31 | if (kind === 'CSINode') { 32 | if (typeof vpk.csiNodeFnum[fnum] === 'undefined') { 33 | vpk.csiNodeFnum[fnum] = [] 34 | } 35 | vpk.csiNodeFnum[fnum].push({ 36 | 'fnum': fnum, 37 | 'name': name, 38 | 'drivers': obj.spec.drivers 39 | }) 40 | } else if (kind === 'CSIDriver') { 41 | if (typeof vpk.csiDriverName[name] === 'undefined') { 42 | vpk.csiDriverName[name] = [] 43 | } 44 | vpk.csiDriverName[name].push({ 45 | 'fnum': fnum, 46 | 'name': name 47 | }) 48 | } 49 | 50 | } catch (err) { 51 | utl.logMsg('vpkCSI001 - Error processing StorageClass for fnum: ' + fnum + ' message: ' + err); 52 | utl.logMsg('vpkCSI001 - Stack: ' + err.stack); 53 | } 54 | }; 55 | 56 | //------------------------------------------------------------------------------ 57 | // common routines 58 | //------------------------------------------------------------------------------ 59 | module.exports = { 60 | parse: function (kind, name, obj, fnum) { 61 | parseCSI(kind, name, obj, fnum); 62 | } 63 | }; -------------------------------------------------------------------------------- /lib/parseControllerRevision.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse the controller revision 22 | */ 23 | 24 | var vpk = require('./vpk'); 25 | var utl = require('./utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseControllerRevision = function (ns, y_kind, name, obj, fnum) { 29 | try { 30 | let oKind = ''; 31 | let oName = ''; 32 | let oUid = ''; 33 | if (typeof obj.metadata !== 'undefined') { 34 | if (typeof obj.metadata.name !== 'undefined') { 35 | if (typeof vpk.controllerRevision[fnum] === 'undefined') { 36 | vpk.controllerRevision[fnum] = []; 37 | } 38 | if (typeof obj.metadata.ownerReferences !== 'undefined') { 39 | if (typeof obj.metadata.ownerReferences[0].kind !== 'undefined') { 40 | oKind = obj.metadata.ownerReferences[0].kind 41 | } 42 | if (typeof obj.metadata.ownerReferences[0].name !== 'undefined') { 43 | oName = obj.metadata.ownerReferences[0].name 44 | } 45 | if (typeof obj.metadata.ownerReferences[0].uid !== 'undefined') { 46 | oUid = obj.metadata.ownerReferences[0].uid 47 | } 48 | } 49 | 50 | vpk.controllerRevision[fnum].push({ 51 | 'name': obj.metadata.name, 52 | 'fnum': fnum, 53 | 'namespace': ns, 54 | 'ownerKind': oKind, 55 | 'ownerName': oName, 56 | 'ownerUid': oUid 57 | }); 58 | } 59 | } 60 | 61 | } catch (err) { 62 | utl.logMsg('vpkCRV001 - Error processing file fnum: ' + fnum + ' kind: ' + y_kind + ' message: ' + err); 63 | utl.logMsg('vpkCRV001 - Stack: ' + err.stack); 64 | } 65 | }; 66 | 67 | //------------------------------------------------------------------------------ 68 | // common routines 69 | //------------------------------------------------------------------------------ 70 | module.exports = { 71 | parse: function (ns, kind, name, obj, fnum) { 72 | parseControllerRevision(ns, kind, name, obj, fnum); 73 | } 74 | }; -------------------------------------------------------------------------------- /lib/parseEndpointSlice.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse endpoint slices 22 | */ 23 | 24 | var vpk = require('./vpk'); 25 | var utl = require('./utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseEndpointSlice = function (ns, y_kind, name, obj, fnum) { 29 | 30 | try { 31 | let tRef; 32 | let tName = ''; 33 | let tKind = ''; 34 | let tNamespace = ''; 35 | let tUid = ''; 36 | let oName = ''; 37 | let oUid = ''; 38 | let oKind = ''; 39 | if (typeof obj.metadata.ownerReferences === 'undefined') { 40 | utl.logMsg('vpkEPS003 - EndpointSlice has no ownerRef, fnum: ' + fnum + ' ns: ' + ns + ' name: ' + name); 41 | } 42 | 43 | if (typeof obj.endpoints !== 'undefined') { 44 | if (obj.endpoints !== null) { 45 | if (typeof obj.endpoints[0] !== 'undefined') { 46 | if (typeof obj.endpoints[0].targetRef !== 'undefined') { 47 | tRef = obj.endpoints[0].targetRef; 48 | if (typeof tRef.name !== 'undefined') { 49 | tName = tRef.name 50 | } 51 | if (typeof tRef.namespace !== 'undefined') { 52 | tNamespace = tRef.namespace 53 | } 54 | if (typeof tRef.kind !== 'undefined') { 55 | tKind = tRef.kind 56 | } 57 | if (typeof tRef.uid !== 'undefined') { 58 | tUid = tRef.uid 59 | } 60 | } 61 | } 62 | } else { 63 | utl.logMsg('vpkEPS004 - EndpointSlice has no endpoint, fnum: ' + fnum + ' ns: ' + ns + ' name: ' + name); 64 | tname = ''; 65 | tNamespace = ''; 66 | tKind = ''; 67 | tUid = '' 68 | } 69 | } 70 | 71 | if (typeof obj.metadata.ownerReferences !== 'undefined') { 72 | if (typeof obj.metadata.ownerReferences[0].name !== 'undefined') { 73 | oName = obj.metadata.ownerReferences[0].name; 74 | } 75 | if (typeof obj.metadata.ownerReferences[0].uid !== 'undefined') { 76 | oUid = obj.metadata.ownerReferences[0].uid; 77 | } 78 | if (typeof obj.metadata.ownerReferences[0].kind !== 'undefined') { 79 | oKind = obj.metadata.ownerReferences[0].kind; 80 | } 81 | } 82 | 83 | if (typeof obj.metadata.labels !== 'undefined') { 84 | if (typeof obj.metadata.labels['kubernetes.io/service-name'] !== 'undefined') { 85 | labelServiceName = obj.metadata.labels['kubernetes.io/service-name']; 86 | } 87 | } 88 | 89 | 90 | if (typeof vpk.endpointSliceService[name] === 'undefined') { 91 | vpk.endpointSliceService[name] = []; 92 | } 93 | vpk.endpointSliceService[name].push({ 94 | 'fnum': fnum, 95 | 'targetName': tName, 96 | 'targetKind': tKind, 97 | 'targetUid': tUid, 98 | 'targetNamespace': tNamespace, 99 | 'ownerName': oName, 100 | 'ownerUid': oUid, 101 | 'ownerKind': oKind, 102 | 'labelServiceName': labelServiceName 103 | }); 104 | 105 | 106 | } catch (err) { 107 | utl.logMsg('vpkEPS001 - Error processing file fnum: ' + fnum + ' kind: ' + y_kind + ' message: ' + err); 108 | utl.logMsg('vpkEPS001 - Stack: ' + err.stack); 109 | } 110 | }; 111 | 112 | 113 | //------------------------------------------------------------------------------ 114 | // common routines 115 | //------------------------------------------------------------------------------ 116 | module.exports = { 117 | parse: function (ns, kind, name, obj, fnum) { 118 | parseEndpointSlice(ns, kind, name, obj, fnum); 119 | } 120 | }; -------------------------------------------------------------------------------- /lib/parseEndpoints.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse endpoints 22 | */ 23 | 24 | var vpk = require('./vpk'); 25 | var utl = require('./utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseEndpoints = function (ns, y_kind, name, obj, fnum) { 29 | let oRef; 30 | let targetUid; 31 | 32 | try { 33 | 34 | if (typeof obj.metadata !== 'undefined') { 35 | if (typeof obj.metadata.ownerReferences !== 'undefined') { 36 | oRef = obj.metadata.ownerReferences 37 | } else { 38 | oRef = []; 39 | } 40 | targetUid = ''; 41 | if (typeof obj.subsets !== 'undefined') { 42 | if (typeof obj.subsets[0] !== 'undefined') { 43 | if (typeof obj.subsets[0].addresses !== 'undefined') { 44 | if (typeof obj.subsets[0].addresses[0] !== 'undefined') { 45 | if (typeof obj.subsets[0].addresses[0].targetRef !== 'undefined') { 46 | if (typeof obj.subsets[0].addresses[0].targetRef.uid !== 'undefined') { 47 | targetUid = obj.subsets[0].addresses[0].targetRef.uid; 48 | } 49 | } 50 | } 51 | } 52 | } 53 | } 54 | 55 | if (typeof vpk.endpointsLinks[fnum] === 'undefined') { 56 | vpk.endpointsLinks[fnum] = []; 57 | } 58 | vpk.endpointsLinks[fnum].push({ 59 | 'name': obj.metadata.name, 60 | 'oRef': oRef, 61 | 'fnum': fnum, 62 | 'targetUid': targetUid 63 | }); 64 | 65 | } 66 | 67 | } catch (err) { 68 | utl.logMsg('vpkEPX001 - Error processing file fnum: ' + fnum + ' kind: ' + y_kind + ' message: ' + err); 69 | utl.logMsg('vpkEPX001 - Stack: ' + err.stack); 70 | } 71 | }; 72 | 73 | 74 | //------------------------------------------------------------------------------ 75 | // common routines 76 | //------------------------------------------------------------------------------ 77 | module.exports = { 78 | parse: function (ns, kind, name, obj, fnum) { 79 | parseEndpoints(ns, kind, name, obj, fnum); 80 | } 81 | }; -------------------------------------------------------------------------------- /lib/parseEvent.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse events 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseEvent = function (ns, kind, name, obj, fnum) { 29 | let msg = ''; 30 | let eNamespace = ''; 31 | let type = ''; 32 | let eKind = ''; 33 | let eName = ''; 34 | let reason = ''; 35 | let firstTime = ''; 36 | let lastTime = ''; 37 | let count = ''; 38 | try { 39 | if (typeof obj.involvedObject.kind !== 'undefined') { 40 | eKind = obj.involvedObject.kind; 41 | } 42 | if (typeof obj.involvedObject.name !== 'undefined') { 43 | eName = obj.involvedObject.name; 44 | } 45 | if (typeof obj.involvedObject.namespace !== 'undefined') { 46 | eNamespace = obj.involvedObject.namespace; 47 | } 48 | if (typeof obj.message !== 'undefined') { 49 | msg = obj.message; 50 | } 51 | if (typeof obj.type !== 'undefined') { 52 | type = obj.type; 53 | } 54 | if (typeof obj.reason !== 'undefined') { 55 | reason = obj.reason; 56 | } 57 | if (typeof obj.count !== 'undefined') { 58 | count = obj.count; 59 | } 60 | if (typeof obj.firstTimestamp !== 'undefined') { 61 | firstTime = obj.firstTimestamp; 62 | } 63 | if (typeof obj.lastTimestamp !== 'undefined') { 64 | lastTime = obj.lastTimestamp; 65 | } 66 | 67 | let key = eKind + '.' + eNamespace + '.' + eName; 68 | vpk.eventMessage.push({ 69 | 'key': key, 70 | 'kind': eKind, 71 | 'name': eName, 72 | 'involvedKind': eKind, 73 | 'involvedNamespace': eNamespace, 74 | 'involvedName': eName, 75 | 'fnum': fnum, 76 | 'message': msg, 77 | 'firstTime': firstTime, 78 | 'lastTime': lastTime, 79 | 'count': count, 80 | 'reason': reason, 81 | 'type': type 82 | }); 83 | 84 | } catch (err) { 85 | utl.logMsg('vpkEVT001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 86 | utl.logMsg('vpkEVT001 - Stack: ' + err.stack) 87 | } 88 | }; 89 | 90 | //------------------------------------------------------------------------------ 91 | // common routines 92 | //------------------------------------------------------------------------------ 93 | module.exports = { 94 | parse: function (ns, kind, name, obj, fnum) { 95 | parseEvent(ns, kind, name, obj, fnum); 96 | } 97 | }; -------------------------------------------------------------------------------- /lib/parseGeneric.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Generic template to parse kubernetes resource type/kind 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | var hierarchy = require('../lib/hierarchy'); 27 | 28 | //------------------------------------------------------------------------------ 29 | var parseGeneric = function (ns, kind, name, fnum) { 30 | try { 31 | // build the key and save the data 32 | var lkey = ns + '.' + kind + '.' + name; 33 | utl.checkType(kind, lkey); 34 | var item = { 35 | 'namespace': ns, 36 | 'kind': kind, 37 | 'objName': name, 38 | 'fnum': fnum 39 | } 40 | 41 | vpk[kind][lkey].push(item); 42 | utl.checkKind(kind); 43 | 44 | // add the information to cluster hierarchy 45 | hierarchy.addEntry(ns, kind, name, fnum) 46 | 47 | } catch (err) { 48 | utl.logMsg('vpkGEN001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 49 | utl.logMsg('vpkGEN001 - Stack: ' + err.stack); 50 | } 51 | }; 52 | 53 | //------------------------------------------------------------------------------ 54 | // common routines 55 | //------------------------------------------------------------------------------ 56 | module.exports = { 57 | parse: function (ns, kind, name, fnum) { 58 | parseGeneric(ns, kind, name, fnum); 59 | } 60 | }; -------------------------------------------------------------------------------- /lib/parseHPA.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse horizontal pod autoscaler 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseHPA = function (ns, kind, name, obj, fnum) { 29 | try { 30 | if (typeof obj.spec !== 'undefined') { 31 | if (typeof obj.spec.scaleTargetRef !== 'undefined') { 32 | let hpaLinkKind = ''; 33 | let hpaLinkName = ''; 34 | if (typeof obj.spec.scaleTargetRef.kind !== 'undefined') { 35 | hpaLinkKind = obj.spec.scaleTargetRef.kind; 36 | } 37 | if (typeof obj.spec.scaleTargetRef.name !== 'undefined') { 38 | hpaLinkName = obj.spec.scaleTargetRef.name; 39 | } 40 | if (typeof vpk.hpaLinks[fnum] === 'undefined') { 41 | vpk.hpaLinks[fnum] = [] 42 | } 43 | vpk.hpaLinks[fnum].push({ 44 | 'hpaLinkName': hpaLinkName, 45 | 'hpaLinkKind': hpaLinkKind, 46 | 'fnum': fnum, 47 | 'name': name, 48 | 'spec': obj.spec, 49 | 'namespace': ns 50 | }); 51 | } 52 | } 53 | } catch (err) { 54 | utl.logMsg('vpkHPA001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 55 | utl.logMsg('vpkHPA001 - Stack: ' + err.stack); 56 | } 57 | }; 58 | 59 | //------------------------------------------------------------------------------ 60 | // common routines 61 | //------------------------------------------------------------------------------ 62 | module.exports = { 63 | parse: function (ns, kind, name, obj, fnum) { 64 | parseHPA(ns, kind, name, obj, fnum); 65 | } 66 | }; -------------------------------------------------------------------------------- /lib/parseNode.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse Node 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | var stripKi = function (amt) { 28 | let newAmt = amt.substring(0, amt.length - 2); 29 | newAmt = parseInt(newAmt); 30 | newAmt = newAmt * 1024; 31 | newAmt = utl.formatBytes(newAmt); 32 | return newAmt.substring(3); 33 | } 34 | 35 | //------------------------------------------------------------------------------ 36 | var parseNode = function (ns, kind, name, obj, fnum) { 37 | let type = ''; 38 | let capac = {}; 39 | let alloc = {}; 40 | let conditions = []; 41 | const masterKey = 'node-role.kubernetes.io/master'; 42 | const controlPlane = 'node-role.kubernetes.io/control-plane'; 43 | // console.log(JSON.stringify(obj, null, 2)) 44 | try { 45 | if (typeof vpk.nodesFnum[fnum] === 'undefined') { 46 | vpk.nodesFnum[fnum] = [] 47 | } 48 | // build node type, default is worker 49 | type = 'w' // worker node 50 | if (typeof obj.metadata.labels[masterKey] !== 'undefined') { 51 | type = 'm' // master node 52 | } 53 | if (typeof obj.metadata.labels[controlPlane] !== 'undefined') { 54 | type = 'm' // master node 55 | } 56 | 57 | // populate node allocatable and capacity 58 | if (typeof obj.status.capacity !== 'undefined') { 59 | capac = obj.status.capacity 60 | } 61 | if (typeof obj.status.allocatable !== 'undefined') { 62 | alloc = obj.status.allocatable 63 | } 64 | 65 | // populate conditions info 66 | if (typeof obj.status.conditions !== 'undefined') { 67 | conditions = obj.status.conditions; 68 | } 69 | 70 | vpk.nodesFnum[fnum].push({ 71 | 'name': name, 72 | 'fnum': fnum, 73 | 'type': type, 74 | 'api': obj.apiVersion, 75 | 'a_cpu': alloc.cpu, 76 | 'a_memory': alloc.memory, 77 | 'a_memory-gb': stripKi(alloc.memory), 78 | 'a_pods': alloc.pods, 79 | 'c_cpu': capac.cpu, 80 | 'c_memory': capac.memory, 81 | 'c_memory-gb': stripKi(capac.memory), 82 | 'c_pods': capac.pods, 83 | 'conditions': conditions, 84 | 'csiNodes': [] 85 | }); 86 | 87 | 88 | } catch (err) { 89 | utl.logMsg('vpkNOD001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 90 | utl.logMsg('vpkNOD001 - Stack: ' + err.stack); 91 | } 92 | }; 93 | 94 | //------------------------------------------------------------------------------ 95 | // common routines 96 | //------------------------------------------------------------------------------ 97 | module.exports = { 98 | parse: function (ns, kind, name, obj, fnum) { 99 | parseNode(ns, kind, name, obj, fnum); 100 | } 101 | }; -------------------------------------------------------------------------------- /lib/parseNodeSelector.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | NodeSelector processing 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseNodeSelector = function (ns, kind, name, obj, yk, fnum) { 29 | 30 | try { 31 | if (typeof obj !== 'undefined') { 32 | for (item in obj) { 33 | var nkey = ''; 34 | var key = item; 35 | var value = obj[item]; 36 | 37 | nkey = ns + '.' + kind + '.' + key + '.' + value; 38 | utl.checkType(kind, nkey); 39 | if (typeof vpk[kind][nkey] === 'undefined') { 40 | vpk[kind][nkey] = []; 41 | 42 | var tmp = vpk[kind][nkey]; 43 | var item = { 44 | 'namespace': ns, 45 | 'kind': kind, 46 | 'objName': name, 47 | 'key': key, 48 | 'value': value, 49 | 'fnum': fnum 50 | }; 51 | tmp.push(item); 52 | vpk[kind][nkey] = tmp; 53 | } 54 | } 55 | } 56 | } catch (err) { 57 | utl.logMsg('vpkNOD001 - Error processing file fnum: ' + fnum + ' message: ' + err); 58 | utl.logMsg('vpkNOD001 - Stack: ' + err.stack); 59 | } 60 | }; 61 | 62 | 63 | //------------------------------------------------------------------------------ 64 | // exports 65 | //------------------------------------------------------------------------------ 66 | module.exports = { 67 | 68 | parse: function (ns, kind, name, obj, yk, fnum) { 69 | parseNodeSelector(ns, kind, name, obj, yk, fnum); 70 | } 71 | }; -------------------------------------------------------------------------------- /lib/parsePersistentVolumeClaim.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse persistent volume claim 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parsePVC = function (ns, kind, name, obj, fnum) { 29 | 30 | let pName = name; 31 | let namespace = ns; 32 | let label; 33 | let keys; 34 | let key; 35 | let data = ''; 36 | let storageClass = ''; 37 | let volumeName = ''; 38 | let spaceReq = ''; 39 | try { 40 | 41 | if (typeof obj.spec.storageClassName !== 'undefined') { 42 | storageClass = obj.spec.storageClassName; 43 | } 44 | 45 | if (typeof obj.spec.volumeName !== 'undefined') { 46 | volumeName = obj.spec.volumeName; 47 | } 48 | 49 | if (typeof obj.spec.selector !== 'undefined') { 50 | if (typeof obj.spec.selector.matchLabels !== 'undefined') { 51 | label = obj.spec.selector.matchLabels; 52 | keys = Object.keys(obj.spec.selector.matchLabels); 53 | if (typeof keys[0] !== 'undefined') { 54 | key = keys[0]; 55 | data = key + ': ' + label[keys[0]] 56 | } 57 | } 58 | } else { 59 | data = ''; 60 | } 61 | 62 | // track the space requested by PVC; 63 | if (typeof obj.spec.resources !== 'undefined') { 64 | if (typeof obj.spec.resources.requests !== 'undefined') { 65 | if (typeof obj.spec.resources.requests.storage !== 'undefined') { 66 | spaceReq = utl.spaceCalc(obj.spec.resources.requests.storage) 67 | vpk.spaceReqPVC.push({ 68 | 'name': name, 69 | 'ns': ns, 70 | 'space': spaceReq, 71 | 'storageClass': storageClass, 72 | 'fmtSpc': utl.formatBytes(spaceReq) 73 | }) 74 | } 75 | } 76 | } 77 | 78 | // pvcFnum 79 | if (typeof vpk.pvcFnum[fnum] === 'undefined') { 80 | vpk.pvcFnum[fnum] = [] 81 | } 82 | vpk.pvcFnum[fnum].push({ 83 | 'name': pName, 84 | 'namespace': namespace, 85 | 'fnum': fnum, 86 | 'storageClass': storageClass, 87 | 'volumeName': volumeName, 88 | 'pvSelectorLabel': data, 89 | 'space': spaceReq, 90 | 'fmtSpc': utl.formatBytes(spaceReq) 91 | }); 92 | 93 | 94 | // pvcLinks 95 | if (typeof vpk.pvcLinks[pName] === 'undefined') { 96 | vpk.pvcLinks[pName] = [] 97 | } 98 | vpk.pvcLinks[pName].push({ 99 | 'name': pName, 100 | 'namespace': namespace, 101 | 'fnum': fnum, 102 | 'storageClass': storageClass, 103 | 'volumeName': volumeName, 104 | 'pvSelectorLabel': data, 105 | 'space': spaceReq, 106 | 'fmtSpc': utl.formatBytes(spaceReq) 107 | }); 108 | 109 | //pvcNames 110 | if (typeof vpk.pvcNames[name] === 'undefined') { 111 | vpk.pvcNames[name] = [] 112 | } 113 | vpk.pvcNames[name].push({ 114 | 'name': name, 115 | 'namespace': namespace, 116 | 'fnum': fnum, 117 | 'storageClass': storageClass, 118 | 'volumeName': volumeName, 119 | 'pvSelectorLabel': data, 120 | 'space': spaceReq, 121 | 'fmtSpc': utl.formatBytes(spaceReq) 122 | }); 123 | 124 | } catch (err) { 125 | utl.logMsg('vpkPVC001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 126 | utl.logMsg('vpkPVC001 - Stack: ' + err.stack); 127 | } 128 | }; 129 | 130 | //------------------------------------------------------------------------------ 131 | // common routines 132 | //------------------------------------------------------------------------------ 133 | module.exports = { 134 | parse: function (ns, kind, name, obj, fnum) { 135 | parsePVC(ns, kind, name, obj, fnum); 136 | } 137 | }; -------------------------------------------------------------------------------- /lib/parseSecret.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse secret 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseSecret = function (ns, kind, name, obj, fnum) { 29 | let type = ''; 30 | try { 31 | if (typeof vpk.secretFnum[fnum] === 'undefined') { 32 | vpk.secretFnum[fnum] = [] 33 | } 34 | type = obj.type; 35 | vpk.secretFnum[fnum].push({ 36 | 'name': name, 37 | 'fnum': fnum, 38 | 'type': type, 39 | 'api': obj.apiVersion, 40 | 'namespace': ns 41 | }); 42 | } catch (err) { 43 | utl.logMsg('vpkSEC001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 44 | utl.logMsg('vpkSEC001 - Stack: ' + err.stack); 45 | } 46 | }; 47 | 48 | //------------------------------------------------------------------------------ 49 | // common routines 50 | //------------------------------------------------------------------------------ 51 | module.exports = { 52 | parse: function (ns, kind, name, obj, fnum) { 53 | parseSecret(ns, kind, name, obj, fnum); 54 | } 55 | }; -------------------------------------------------------------------------------- /lib/parseServiceAccount.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse service account 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseServiceAccount = function (ns, kind, name, obj, fnum) { 29 | let imagePullSecrets; 30 | let secrets; 31 | try { 32 | if (typeof vpk.serviceAccounts[fnum] === 'undefined') { 33 | vpk.serviceAccounts[fnum] = [] 34 | } 35 | if (typeof obj.imagePullSecrets === 'undefined') { 36 | imagePullSecrets = []; 37 | } else { 38 | imagePullSecrets = obj.imagePullSecrets; 39 | } 40 | if (typeof obj.secrets === 'undefined') { 41 | secrets = []; 42 | } else { 43 | secrets = obj.secrets; 44 | } 45 | 46 | vpk.serviceAccounts[fnum].push({ 47 | 'name': obj.metadata.name, 48 | 'fnum': fnum, 49 | 'imagePullSecrets': imagePullSecrets, 50 | 'secrets': secrets, 51 | 'namespace': obj.metadata.namespace 52 | }); 53 | 54 | } catch (err) { 55 | utl.logMsg('vpkSVA001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 56 | } 57 | }; 58 | 59 | //------------------------------------------------------------------------------ 60 | // common routines 61 | //------------------------------------------------------------------------------ 62 | module.exports = { 63 | parse: function (ns, kind, name, obj, fnum) { 64 | parseServiceAccount(ns, kind, name, obj, fnum); 65 | } 66 | }; -------------------------------------------------------------------------------- /lib/parseStorageClass.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Parse storage class 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseSC = function (ns, kind, name, obj, fnum) { 29 | 30 | try { 31 | if (typeof obj.metadata !== 'undefined') { 32 | let name = obj.metadata.name; 33 | if (typeof vpk.storageClassName[name] === 'undefined') { 34 | vpk.storageClassName[name] = { 'name': name, 'fnum': fnum }; 35 | if (typeof obj.parameters !== 'undefined') { 36 | vpk.storageClassName[name].parameters = obj.parameters; 37 | } 38 | if (typeof obj.provisioner !== 'undefined') { 39 | vpk.storageClassName[name].provisioner = obj.provisioner; 40 | } 41 | } 42 | } 43 | } catch (err) { 44 | utl.logMsg('vpkSTC001 - Error processing StorageClass for fnum: ' + fnum + ' message: ' + err); 45 | utl.logMsg('vpkSTC001 - Stack ' + err.stack); 46 | } 47 | }; 48 | 49 | //------------------------------------------------------------------------------ 50 | // common routines 51 | //------------------------------------------------------------------------------ 52 | module.exports = { 53 | parse: function (ns, kind, name, obj, fnum) { 54 | parseSC(ns, kind, name, obj, fnum); 55 | } 56 | }; -------------------------------------------------------------------------------- /lib/parseVolumeAttachment.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Generic template to parse kubernetes resource type/kind 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseVolumeAttachment = function (kind, name, obj, fnum) { 29 | 30 | let attacher = 'none'; 31 | let nodeName = 'none'; 32 | let pvName = 'none'; 33 | 34 | try { 35 | if (typeof vpk.volumeAttachment[name] === 'undefined') { 36 | vpk.volumeAttachment[name] = [] 37 | } 38 | 39 | if (typeof obj.spec.attacher !== 'undefined') { 40 | attacher = obj.spec.attacher; 41 | } 42 | 43 | if (typeof obj.spec.nodeName !== 'undefined') { 44 | nodeName = obj.spec.nodeName; 45 | } 46 | 47 | if (typeof obj.spec.source !== 'undefined') { 48 | if (typeof obj.spec.source.persistentVolumeName !== 'undefined') { 49 | pvName = obj.spec.source.persistentVolumeName; 50 | } 51 | } 52 | 53 | vpk.volumeAttachment[name].push({ 54 | 'fnum': fnum, 55 | 'name': name, 56 | 'attacher': attacher, 57 | 'nodeName': nodeName, 58 | 'pvName': pvName 59 | }) 60 | 61 | } catch (err) { 62 | utl.logMsg('vpkVAT001 - Error processing file fnum: ' + fnum + ' kind: ' + kind + ' message: ' + err); 63 | utl.logMsg('vpkVAT001 - Stack: ' + err.stack); 64 | } 65 | }; 66 | 67 | //------------------------------------------------------------------------------ 68 | // common routines 69 | //------------------------------------------------------------------------------ 70 | module.exports = { 71 | parse: function (kind, name, obj, fnum) { 72 | parseVolumeAttachment(kind, name, obj, fnum); 73 | } 74 | }; -------------------------------------------------------------------------------- /lib/parseVolumeClaimTemplate.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /* 21 | Parse volume claim template 22 | */ 23 | 24 | var utl = require('../lib/utl'); 25 | var hierarchy = require('../lib/hierarchy'); 26 | 27 | //------------------------------------------------------------------------------ 28 | var parseVolumeClaimTemplates = function (ns, kind, name, obj, yk, fnum) { 29 | 30 | try { 31 | var storClass = ''; 32 | var vctName; 33 | 34 | for (var v = 0; v < obj.length; v++) { 35 | if (typeof obj[v].spec !== 'undefined') { 36 | if (typeof obj[v].spec.storageClassName !== 'undefined') { 37 | storClass = obj[v].spec.storageClassName; 38 | } else { 39 | storClass = ''; 40 | } 41 | } 42 | 43 | if (typeof obj[v].metadata !== 'undefined') { 44 | if (typeof obj[v].metadata.name !== 'undefined') { 45 | vctName = obj[v].metadata.name; 46 | } else { 47 | vctName = 'unknown'; 48 | } 49 | } 50 | 51 | utl.checkType('VolumeClaimTemplates', ''); 52 | 53 | // add the information to cluster hierarchy 54 | hierarchy.addEntry(ns, yk, name, fnum, 'VolumeClaimTemplates', vctName) 55 | utl.containerLink(fnum, 'VolumeClaimTemplates', vctName, '', obj[v].spec) 56 | 57 | // add the information to cluster hierarchy 58 | if (storClass !== '') { 59 | hierarchy.addEntry(ns, yk, name, fnum, 'VolumeClaimTemplates', vctName, 'StorageClass', storClass) 60 | utl.containerLink(fnum, 'StorageClass', storClass) 61 | } 62 | } 63 | 64 | } catch (err) { 65 | utl.logMsg('vpkVCT001 - Error processing file fnum: ' + fnum + ' message: ' + err); 66 | utl.logMsg('vpkVCT001 - Stack: ' + err.stack); 67 | } 68 | }; 69 | 70 | //------------------------------------------------------------------------------ 71 | // common routines 72 | //------------------------------------------------------------------------------ 73 | module.exports = { 74 | 75 | parse: function (ns, kind, name, obj, yk, fnum) { 76 | parseVolumeClaimTemplates(ns, kind, name, obj, yk, fnum); 77 | } 78 | }; -------------------------------------------------------------------------------- /lib/splash.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*---------------------------------------------------------- 21 | Startup splash 22 | */ 23 | 24 | 'use strict'; 25 | 26 | var commandLineUsage = require('command-line-usage'); 27 | var chalk = require('chalk'); 28 | 29 | var vpk = require('../lib/vpk'); 30 | //var utl = require('../lib/utl'); 31 | 32 | module.exports = { 33 | 34 | //------------------------------------------------------------------------------ 35 | // exported functions 36 | //------------------------------------------------------------------------------ 37 | 38 | help: function (optionDefinitions) { 39 | var usage = commandLineUsage([ 40 | { 41 | header: 'Vpk server', 42 | content: 'Server application that creates and reads snapshots of clusters and hosts the user interface for the browser access to VpK.' 43 | }, 44 | { 45 | header: 'Options', 46 | optionList: optionDefinitions, 47 | tableOptions: { 48 | columns: [ 49 | { 50 | name: 'option', 51 | noWrap: true, 52 | width: 30, 53 | padding: { left: '', right: ' ' }, 54 | }, 55 | { 56 | name: 'description', 57 | width: 50, 58 | padding: { left: ' ', right: '' } 59 | } 60 | ] 61 | } 62 | } 63 | ]); 64 | console.log(usage); 65 | }, 66 | 67 | pop: function (softwareVersion, port) { 68 | var bb = chalk.green; 69 | var VPK_TITLE = chalk.bold.underline('Visual parsed Kubernetes'); 70 | var VPK_VERSION = chalk.bold('Version: ' + softwareVersion); 71 | var VPK_PORT = chalk.bold('Server Port: ' + port) 72 | var VPK_PLATFORM = chalk.bold('Platform: ' + process.platform) 73 | var VPK_RUNMODE = chalk.bold('RunMode: ' + vpk.runMode) 74 | 75 | var tmp = VPK_PLATFORM.split(' '); 76 | if (typeof tmp[1] !== 'undefined') { 77 | vpk.platform = tmp[1]; 78 | } else { 79 | vpk.platform = VPK_PLATFORM; 80 | } 81 | 82 | // Do not change the spacing of the following VPK_HEADER, and 83 | // do not delete the single tick mark 84 | var VPK_HEADER = ` 85 | ${bb('------------------------------------------------------------------')} 86 | | ${''} | 87 | | ${bb('\\˜˜\\')} ${bb('/˜˜/')} ${bb('|˜˜| /˜˜/')} ${bb(VPK_TITLE)} | 88 | | ${bb('\\ \\')} ${bb('/ /')} ${bb('| | / /')} ${bb(VPK_VERSION)} | 89 | | ${bb('\\ \\')} ${bb('/ /')} ${bb('| |/ /')} ${bb(VPK_PORT)} | 90 | | ${bb('\\ \\')} ${bb('/ /')} ${bb('| \\')} ${bb(VPK_RUNMODE)} | 91 | | ${bb('\\ \\')}${bb('/ /')} ${bb('||˜˜˜\\\\')} ${bb('| |˜\\ \\')} | 92 | | ${bb('\\')}${bb(' /')} ${bb('|| ||')} ${bb('| | \\ \\')} | 93 | | ${bb('\\')}${bb('__/')} ${bb('||___//')} ${bb('|__| \\__\\')} | 94 | | ${bb('||')} | 95 | | ${bb('||')} | 96 | ${bb('------------------------------------------------------------------')} 97 | ${bb(VPK_PLATFORM)} 98 | ` 99 | //Do not delete the single tick mark above 100 | 101 | 102 | var adv = commandLineUsage([{ 103 | content: VPK_HEADER, 104 | raw: true, 105 | }]); 106 | console.log(adv); 107 | } 108 | } -------------------------------------------------------------------------------- /lib/storage.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /*------------------------------------------------------------------------------ 21 | Build and populate storage array 22 | */ 23 | 24 | var vpk = require('../lib/vpk'); 25 | var utl = require('../lib/utl'); 26 | 27 | //------------------------------------------------------------------------------ 28 | const processBuild = function () { 29 | vpk.storageInfo = {}; 30 | try { 31 | vpk.storageInfo.StorageClass = vpk.storageClassName; 32 | vpk.storageInfo.PVinfo = vpk.pvFnum; 33 | vpk.storageInfo.PVCinfo = vpk.pvcFnum; 34 | vpk.storageInfo.CSIDriver = vpk.csiDriverName; 35 | vpk.storageInfo.CSINode = vpk.csiNodeFnum; 36 | vpk.storageInfo.SpaceReqSC = vpk.spaceReqSC; 37 | vpk.storageInfo.SpaceReqPVC = vpk.spaceReqPVC; 38 | return; 39 | } catch (err) { 40 | utl.logMsg('vpkSTO001 - Error building storageInfo, message: ' + err); 41 | utl.logMsg('vpkSTO001 - Stack: ' + err.stack); 42 | return ''; 43 | } 44 | }; 45 | 46 | //------------------------------------------------------------------------------ 47 | // common routines 48 | //------------------------------------------------------------------------------ 49 | module.exports = { 50 | //------------------------------------------------------------------------------ 51 | buildStorage: function () { 52 | processBuild() 53 | } 54 | }; -------------------------------------------------------------------------------- /lib/vpk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018-2022 K8Debug 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 5 | and associated documentation files (the "Software"), to deal in the Software without restriction, 6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial 11 | portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 14 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | */ 19 | 20 | /* 21 | 22 | Global VPK object. 23 | 24 | */ 25 | let vpk = module.exports = { 26 | imageRegistry: {}, 27 | containerImages: {}, 28 | viewSecHierarchy: [], 29 | viewSecSubject: [], 30 | viewSecBinding: [], 31 | viewSecRole: [], 32 | viewSecNS: [], 33 | viewSecRules: [], 34 | secVerbSetList: {}, 35 | secApiGroupsList: {}, 36 | secResourcesList: {}, 37 | secArray: [], 38 | secApiGroups: {}, 39 | secResources: {}, 40 | secSubjects: {}, 41 | secSubjectsHierarchy: {}, 42 | secResourcesHierarchy: {}, 43 | secRoles: {}, 44 | ownerLinks: {}, 45 | ownerRefs: [], 46 | childRefs: [], 47 | svcspec: [], 48 | daemonSetPods: [], 49 | nodesFnum: [], 50 | validDir: true, 51 | resetReq: false, 52 | csiDriverName: {}, 53 | csiNodeFnum: {}, 54 | volumeAttachment: {}, 55 | pvCsi: [], 56 | spaceReqSC: {}, 57 | spaceReqPVC: [], 58 | volumeTypes: {}, 59 | volumeInfo: [], 60 | storageInfo: {}, 61 | explains: {}, 62 | ownerChains: {}, 63 | roleRefRole: {}, 64 | subjectMissingCnt: 0, 65 | defaultSettings: {}, 66 | namespaceCnt: {}, 67 | fileCnt: {}, 68 | crds: {}, 69 | subjects: {}, 70 | roleFnum: {}, 71 | clusterRoleFnum: {}, 72 | controllerRevision: {}, 73 | schematicBuilt: false, 74 | allKeys: [], 75 | serviceAccounts: {}, 76 | podList: {}, 77 | hpaLinks: {}, 78 | apis: {}, 79 | owners: {}, 80 | allUids: {}, 81 | apiFnum: [], 82 | roleBindingFnum: {}, 83 | clusterRoleBindingFnum: {}, 84 | secretFnum: {}, 85 | fnumUsed: [], 86 | eventMessage: [], 87 | svgMsg: [], 88 | storageClassName: {}, 89 | //storageClassLinks: {}, 90 | pvFnum: {}, 91 | pvLabels: {}, 92 | pvcFnum: {}, 93 | pvcLinks: {}, 94 | pvcNames: {}, 95 | ownerNumber: 100000, 96 | ownerUids: {}, 97 | endpointSliceService: {}, 98 | endpointSliceLinks: {}, 99 | endpointsLinks: {}, 100 | servicePorts: {}, 101 | serviceFnum: {}, 102 | serviceLabels: {}, 103 | serviceName: {}, 104 | serviceNoSelector: {}, 105 | pods: {}, 106 | 107 | // validation failure counts 108 | vCnt: 0, 109 | tCnt: 0, 110 | rCnt: 0, 111 | pCnt: 0, 112 | repCnt: 0, 113 | 114 | //global work vars for files and directories 115 | baseFS: '', 116 | filesFS: [], 117 | dirFS: [], 118 | dirPtr: -1, 119 | dirname: '', 120 | 121 | //starting directory name 122 | startDir: '-none-', 123 | 124 | //process flag 125 | loop: true, 126 | 127 | //run stats 128 | dCnt: 0, 129 | fCnt: 0, 130 | yCnt: 0, 131 | xCnt: 0, 132 | dupCnt: 0, 133 | 134 | yaml: '', 135 | yBASE: 0, 136 | 137 | k_cont: new Object(), 138 | 139 | file_sources: [], 140 | file_id: 0, 141 | 142 | genericType: ':', 143 | 144 | kinds: {}, 145 | kindStats: {}, 146 | 147 | definedNamespaces: { 148 | 'all-namespaces': 'all-namespaces' 149 | }, 150 | 151 | generic: {}, 152 | genericCnt: 0, 153 | 154 | vpkLogMsg: [], 155 | 156 | cmdHist: [], 157 | 158 | apitypes: [], 159 | 160 | counts: [], 161 | 162 | kindList: '', 163 | 164 | rtn: {}, 165 | 166 | //relations: {}, 167 | 168 | dropManagedFields: true, 169 | 170 | dropStatus: true, 171 | 172 | hierarchy: {}, 173 | 174 | hierarchyFile: {}, 175 | 176 | fileNames: [], 177 | 178 | fileContent: {}, 179 | 180 | fileContentCnt: 0, 181 | 182 | labelKeys: [], 183 | 184 | uid: {}, 185 | 186 | xrefDefined: '#$@', 187 | 188 | //last var/holder 189 | do_not_delete: 'do not delete' 190 | }; 191 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vpk", 3 | "version": "5.0.0", 4 | "description": "Visual parsed Kubernetes", 5 | "main": "server.js", 6 | "scripts": { 7 | "start": "node server.js -p 4200", 8 | "container": "node server.js -p 4200 -c yes" 9 | }, 10 | "author": "K8Debug", 11 | "license": "MIT", 12 | "dependencies": { 13 | "body-parser": "^1.18.2", 14 | "chalk": "^2.3.2", 15 | "command-line-args": "^5.0.2", 16 | "command-line-usage": "^4.1.0", 17 | "compression": "^1.7.4", 18 | "cors": "^2.8.4", 19 | "ejs": "^3.1.5", 20 | "express": "^4.16.2", 21 | "express-ejs-layouts": "^2.5.0", 22 | "express-partials": "^0.3.0", 23 | "express-session": "^1.17.1", 24 | "flatted": "^3.2.7", 25 | "fs": "0.0.2", 26 | "fs-extra": "^5.0.0", 27 | "js-yaml": "^3.10.0", 28 | "markdown-it": "^13.0.1", 29 | "q": "^1.5.1", 30 | "socket.io": "^2.3.0", 31 | "socket.io-client": "^2.3.0" 32 | }, 33 | "repository": { 34 | "type": "git", 35 | "url": "https://github.com/k8debug/VpK.git" 36 | }, 37 | "devDependencies": { 38 | "eslint": "^7.15.0" 39 | } 40 | } -------------------------------------------------------------------------------- /public/ace/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/ace/.DS_Store -------------------------------------------------------------------------------- /public/ace/ext-error_marker.js: -------------------------------------------------------------------------------- 1 | 2 | ; (function() { 3 | ace.require(["ace/ext/error_marker"], function(m) { 4 | if (typeof module == "object" && typeof exports == "object" && module) { 5 | module.exports = m; 6 | } 7 | }); 8 | })(); 9 | -------------------------------------------------------------------------------- /public/ace/ext-themelist.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/ext/themelist",["require","exports","module"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | var themeData = [ 5 | ["Chrome" ], 6 | ["Clouds" ], 7 | ["Crimson Editor" ], 8 | ["Dawn" ], 9 | ["Dreamweaver" ], 10 | ["Eclipse" ], 11 | ["GitHub" ], 12 | ["IPlastic" ], 13 | ["Solarized Light"], 14 | ["TextMate" ], 15 | ["Tomorrow" ], 16 | ["XCode" ], 17 | ["Kuroir"], 18 | ["KatzenMilch"], 19 | ["SQL Server" ,"sqlserver" , "light"], 20 | ["Ambiance" ,"ambiance" , "dark"], 21 | ["Chaos" ,"chaos" , "dark"], 22 | ["Clouds Midnight" ,"clouds_midnight" , "dark"], 23 | ["Dracula" ,"" , "dark"], 24 | ["Cobalt" ,"cobalt" , "dark"], 25 | ["Gruvbox" ,"gruvbox" , "dark"], 26 | ["Green on Black" ,"gob" , "dark"], 27 | ["idle Fingers" ,"idle_fingers" , "dark"], 28 | ["krTheme" ,"kr_theme" , "dark"], 29 | ["Merbivore" ,"merbivore" , "dark"], 30 | ["Merbivore Soft" ,"merbivore_soft" , "dark"], 31 | ["Mono Industrial" ,"mono_industrial" , "dark"], 32 | ["Monokai" ,"monokai" , "dark"], 33 | ["Pastel on dark" ,"pastel_on_dark" , "dark"], 34 | ["Solarized Dark" ,"solarized_dark" , "dark"], 35 | ["Terminal" ,"terminal" , "dark"], 36 | ["Tomorrow Night" ,"tomorrow_night" , "dark"], 37 | ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"], 38 | ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"], 39 | ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"], 40 | ["Twilight" ,"twilight" , "dark"], 41 | ["Vibrant Ink" ,"vibrant_ink" , "dark"] 42 | ]; 43 | 44 | 45 | exports.themesByName = {}; 46 | exports.themes = themeData.map(function(data) { 47 | var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); 48 | var theme = { 49 | caption: data[0], 50 | theme: "ace/theme/" + name, 51 | isDark: data[2] == "dark", 52 | name: name 53 | }; 54 | exports.themesByName[name] = theme; 55 | return theme; 56 | }); 57 | 58 | }); (function() { 59 | ace.require(["ace/ext/themelist"], function(m) { 60 | if (typeof module == "object" && typeof exports == "object" && module) { 61 | module.exports = m; 62 | } 63 | }); 64 | })(); 65 | -------------------------------------------------------------------------------- /public/ace/snippets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/ace/snippets/.DS_Store -------------------------------------------------------------------------------- /public/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.snippetText =undefined; 5 | exports.scope = "yaml"; 6 | 7 | }); (function() { 8 | ace.require(["ace/snippets/yaml"], function(m) { 9 | if (typeof module == "object" && typeof exports == "object" && module) { 10 | module.exports = m; 11 | } 12 | }); 13 | })(); 14 | -------------------------------------------------------------------------------- /public/ace/theme-monokai.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-monokai"; 5 | exports.cssText = ".ace-monokai .ace_gutter {\ 6 | background: #2F3129;\ 7 | color: #8F908A\ 8 | }\ 9 | .ace-monokai .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #555651\ 12 | }\ 13 | .ace-monokai {\ 14 | background-color: #272822;\ 15 | color: #F8F8F2\ 16 | }\ 17 | .ace-monokai .ace_cursor {\ 18 | color: #F8F8F0\ 19 | }\ 20 | .ace-monokai .ace_marker-layer .ace_selection {\ 21 | background: #49483E\ 22 | }\ 23 | .ace-monokai.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #272822;\ 25 | }\ 26 | .ace-monokai .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-monokai .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #49483E\ 32 | }\ 33 | .ace-monokai .ace_marker-layer .ace_active-line {\ 34 | background: #202020\ 35 | }\ 36 | .ace-monokai .ace_gutter-active-line {\ 37 | background-color: #272727\ 38 | }\ 39 | .ace-monokai .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #49483E\ 41 | }\ 42 | .ace-monokai .ace_invisible {\ 43 | color: #52524d\ 44 | }\ 45 | .ace-monokai .ace_entity.ace_name.ace_tag,\ 46 | .ace-monokai .ace_keyword,\ 47 | .ace-monokai .ace_meta.ace_tag,\ 48 | .ace-monokai .ace_storage {\ 49 | color: #F92672\ 50 | }\ 51 | .ace-monokai .ace_punctuation,\ 52 | .ace-monokai .ace_punctuation.ace_tag {\ 53 | color: #fff\ 54 | }\ 55 | .ace-monokai .ace_constant.ace_character,\ 56 | .ace-monokai .ace_constant.ace_language,\ 57 | .ace-monokai .ace_constant.ace_numeric,\ 58 | .ace-monokai .ace_constant.ace_other {\ 59 | color: #AE81FF\ 60 | }\ 61 | .ace-monokai .ace_invalid {\ 62 | color: #F8F8F0;\ 63 | background-color: #F92672\ 64 | }\ 65 | .ace-monokai .ace_invalid.ace_deprecated {\ 66 | color: #F8F8F0;\ 67 | background-color: #AE81FF\ 68 | }\ 69 | .ace-monokai .ace_support.ace_constant,\ 70 | .ace-monokai .ace_support.ace_function {\ 71 | color: #66D9EF\ 72 | }\ 73 | .ace-monokai .ace_fold {\ 74 | background-color: #A6E22E;\ 75 | border-color: #F8F8F2\ 76 | }\ 77 | .ace-monokai .ace_storage.ace_type,\ 78 | .ace-monokai .ace_support.ace_class,\ 79 | .ace-monokai .ace_support.ace_type {\ 80 | font-style: italic;\ 81 | color: #66D9EF\ 82 | }\ 83 | .ace-monokai .ace_entity.ace_name.ace_function,\ 84 | .ace-monokai .ace_entity.ace_other,\ 85 | .ace-monokai .ace_entity.ace_other.ace_attribute-name,\ 86 | .ace-monokai .ace_variable {\ 87 | color: #A6E22E\ 88 | }\ 89 | .ace-monokai .ace_variable.ace_parameter {\ 90 | font-style: italic;\ 91 | color: #FD971F\ 92 | }\ 93 | .ace-monokai .ace_string {\ 94 | color: #E6DB74\ 95 | }\ 96 | .ace-monokai .ace_comment {\ 97 | color: #75715E\ 98 | }\ 99 | .ace-monokai .ace_indent-guide {\ 100 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\ 101 | }"; 102 | 103 | var dom = require("../lib/dom"); 104 | dom.importCssString(exports.cssText, exports.cssClass); 105 | }); (function() { 106 | ace.require(["ace/theme/monokai"], function(m) { 107 | if (typeof module == "object" && typeof exports == "object" && module) { 108 | module.exports = m; 109 | } 110 | }); 111 | })(); 112 | -------------------------------------------------------------------------------- /public/ace/theme-solarized_light.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-solarized-light"; 5 | exports.cssText = ".ace-solarized-light .ace_gutter {\ 6 | background: #fbf1d3;\ 7 | color: #333\ 8 | }\ 9 | .ace-solarized-light .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #e8e8e8\ 12 | }\ 13 | .ace-solarized-light {\ 14 | background-color: #FDF6E3;\ 15 | color: #586E75\ 16 | }\ 17 | .ace-solarized-light .ace_cursor {\ 18 | color: #000000\ 19 | }\ 20 | .ace-solarized-light .ace_marker-layer .ace_selection {\ 21 | background: rgba(7, 54, 67, 0.09)\ 22 | }\ 23 | .ace-solarized-light.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #FDF6E3;\ 25 | }\ 26 | .ace-solarized-light .ace_marker-layer .ace_step {\ 27 | background: rgb(255, 255, 0)\ 28 | }\ 29 | .ace-solarized-light .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(147, 161, 161, 0.50)\ 32 | }\ 33 | .ace-solarized-light .ace_marker-layer .ace_active-line {\ 34 | background: #EEE8D5\ 35 | }\ 36 | .ace-solarized-light .ace_gutter-active-line {\ 37 | background-color : #EDE5C1\ 38 | }\ 39 | .ace-solarized-light .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #7f9390\ 41 | }\ 42 | .ace-solarized-light .ace_invisible {\ 43 | color: rgba(147, 161, 161, 0.50)\ 44 | }\ 45 | .ace-solarized-light .ace_keyword,\ 46 | .ace-solarized-light .ace_meta,\ 47 | .ace-solarized-light .ace_support.ace_class,\ 48 | .ace-solarized-light .ace_support.ace_type {\ 49 | color: #859900\ 50 | }\ 51 | .ace-solarized-light .ace_constant.ace_character,\ 52 | .ace-solarized-light .ace_constant.ace_other {\ 53 | color: #CB4B16\ 54 | }\ 55 | .ace-solarized-light .ace_constant.ace_language {\ 56 | color: #B58900\ 57 | }\ 58 | .ace-solarized-light .ace_constant.ace_numeric {\ 59 | color: #D33682\ 60 | }\ 61 | .ace-solarized-light .ace_fold {\ 62 | background-color: #268BD2;\ 63 | border-color: #586E75\ 64 | }\ 65 | .ace-solarized-light .ace_entity.ace_name.ace_function,\ 66 | .ace-solarized-light .ace_entity.ace_name.ace_tag,\ 67 | .ace-solarized-light .ace_support.ace_function,\ 68 | .ace-solarized-light .ace_variable,\ 69 | .ace-solarized-light .ace_variable.ace_language {\ 70 | color: #268BD2\ 71 | }\ 72 | .ace-solarized-light .ace_storage {\ 73 | color: #073642\ 74 | }\ 75 | .ace-solarized-light .ace_string {\ 76 | color: #2AA198\ 77 | }\ 78 | .ace-solarized-light .ace_string.ace_regexp {\ 79 | color: #D30102\ 80 | }\ 81 | .ace-solarized-light .ace_comment,\ 82 | .ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\ 83 | color: #93A1A1\ 84 | }\ 85 | .ace-solarized-light .ace_indent-guide {\ 86 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\ 87 | }"; 88 | 89 | var dom = require("../lib/dom"); 90 | dom.importCssString(exports.cssText, exports.cssClass); 91 | }); (function() { 92 | ace.require(["ace/theme/solarized_light"], function(m) { 93 | if (typeof module == "object" && typeof exports == "object" && module) { 94 | module.exports = m; 95 | } 96 | }); 97 | })(); 98 | -------------------------------------------------------------------------------- /public/ace/theme-sqlserver.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-sqlserver"; 5 | exports.cssText = ".ace-sqlserver .ace_gutter {\ 6 | background: #ebebeb;\ 7 | color: #333;\ 8 | overflow: hidden;\ 9 | }\ 10 | .ace-sqlserver .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #e8e8e8;\ 13 | }\ 14 | .ace-sqlserver {\ 15 | background-color: #FFFFFF;\ 16 | color: black;\ 17 | }\ 18 | .ace-sqlserver .ace_identifier {\ 19 | color: black;\ 20 | }\ 21 | .ace-sqlserver .ace_keyword {\ 22 | color: #0000FF;\ 23 | }\ 24 | .ace-sqlserver .ace_numeric {\ 25 | color: black;\ 26 | }\ 27 | .ace-sqlserver .ace_storage {\ 28 | color: #11B7BE;\ 29 | }\ 30 | .ace-sqlserver .ace_keyword.ace_operator,\ 31 | .ace-sqlserver .ace_lparen,\ 32 | .ace-sqlserver .ace_rparen,\ 33 | .ace-sqlserver .ace_punctuation {\ 34 | color: #808080;\ 35 | }\ 36 | .ace-sqlserver .ace_set.ace_statement {\ 37 | color: #0000FF;\ 38 | text-decoration: underline;\ 39 | }\ 40 | .ace-sqlserver .ace_cursor {\ 41 | color: black;\ 42 | }\ 43 | .ace-sqlserver .ace_invisible {\ 44 | color: rgb(191, 191, 191);\ 45 | }\ 46 | .ace-sqlserver .ace_constant.ace_buildin {\ 47 | color: rgb(88, 72, 246);\ 48 | }\ 49 | .ace-sqlserver .ace_constant.ace_language {\ 50 | color: #979797;\ 51 | }\ 52 | .ace-sqlserver .ace_constant.ace_library {\ 53 | color: rgb(6, 150, 14);\ 54 | }\ 55 | .ace-sqlserver .ace_invalid {\ 56 | background-color: rgb(153, 0, 0);\ 57 | color: white;\ 58 | }\ 59 | .ace-sqlserver .ace_support.ace_function {\ 60 | color: #FF00FF;\ 61 | }\ 62 | .ace-sqlserver .ace_support.ace_constant {\ 63 | color: rgb(6, 150, 14);\ 64 | }\ 65 | .ace-sqlserver .ace_class {\ 66 | color: #008080;\ 67 | }\ 68 | .ace-sqlserver .ace_support.ace_other {\ 69 | color: #6D79DE;\ 70 | }\ 71 | .ace-sqlserver .ace_variable.ace_parameter {\ 72 | font-style: italic;\ 73 | color: #FD971F;\ 74 | }\ 75 | .ace-sqlserver .ace_comment {\ 76 | color: #008000;\ 77 | }\ 78 | .ace-sqlserver .ace_constant.ace_numeric {\ 79 | color: black;\ 80 | }\ 81 | .ace-sqlserver .ace_variable {\ 82 | color: rgb(49, 132, 149);\ 83 | }\ 84 | .ace-sqlserver .ace_xml-pe {\ 85 | color: rgb(104, 104, 91);\ 86 | }\ 87 | .ace-sqlserver .ace_support.ace_storedprocedure {\ 88 | color: #800000;\ 89 | }\ 90 | .ace-sqlserver .ace_heading {\ 91 | color: rgb(12, 7, 255);\ 92 | }\ 93 | .ace-sqlserver .ace_list {\ 94 | color: rgb(185, 6, 144);\ 95 | }\ 96 | .ace-sqlserver .ace_marker-layer .ace_selection {\ 97 | background: rgb(181, 213, 255);\ 98 | }\ 99 | .ace-sqlserver .ace_marker-layer .ace_step {\ 100 | background: rgb(252, 255, 0);\ 101 | }\ 102 | .ace-sqlserver .ace_marker-layer .ace_stack {\ 103 | background: rgb(164, 229, 101);\ 104 | }\ 105 | .ace-sqlserver .ace_marker-layer .ace_bracket {\ 106 | margin: -1px 0 0 -1px;\ 107 | border: 1px solid rgb(192, 192, 192);\ 108 | }\ 109 | .ace-sqlserver .ace_marker-layer .ace_active-line {\ 110 | background: rgba(0, 0, 0, 0.07);\ 111 | }\ 112 | .ace-sqlserver .ace_gutter-active-line {\ 113 | background-color: #dcdcdc;\ 114 | }\ 115 | .ace-sqlserver .ace_marker-layer .ace_selected-word {\ 116 | background: rgb(250, 250, 255);\ 117 | border: 1px solid rgb(200, 200, 250);\ 118 | }\ 119 | .ace-sqlserver .ace_meta.ace_tag {\ 120 | color: #0000FF;\ 121 | }\ 122 | .ace-sqlserver .ace_string.ace_regex {\ 123 | color: #FF0000;\ 124 | }\ 125 | .ace-sqlserver .ace_string {\ 126 | color: #FF0000;\ 127 | }\ 128 | .ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\ 129 | color: #994409;\ 130 | }\ 131 | .ace-sqlserver .ace_indent-guide {\ 132 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 133 | }\ 134 | "; 135 | 136 | var dom = require("../lib/dom"); 137 | dom.importCssString(exports.cssText, exports.cssClass); 138 | }); (function() { 139 | ace.require(["ace/theme/sqlserver"], function(m) { 140 | if (typeof module == "object" && typeof exports == "object" && module) { 141 | module.exports = m; 142 | } 143 | }); 144 | })(); 145 | -------------------------------------------------------------------------------- /public/docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/.DS_Store -------------------------------------------------------------------------------- /public/docs/cluster.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Cluster 10 | 11 | --- 12 | 13 | View resources defined in the cluster. 14 | 15 | --- 16 | 17 |
18 | 20 |
21 | 22 | --- 23 | 24 | 25 | Cluster view currently provides a tabular view by resource kind. The resource item in the table can be clicked to view the yaml and the icon can be clicked to view the resource explain information. 26 | 27 | --- 28 | 29 |   Next  30 |   TOC   31 |  Prev   32 | -------------------------------------------------------------------------------- /public/docs/comparesnap.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Compare Snapshots 10 | 11 | --- 12 | 13 | Compare two snapshots for difference or matching defined resources. Comparison is performed checking the following: 14 | 15 | * Resource name within namespace. If no namespace is defined the comparison is performed with all resources defined at the cluster level. 16 | * Creation timestamp. 17 | * Spec section of resource file. 18 | 19 | 20 | 21 | ###### Usage: 22 | 23 | 1. Select the two snapshots to compare using the buttons labeled **'Snapshot 1'** and **'Snapshot 2'**. Once selected each snapshot name is shown below the buttons. If the same snapshot is selected for both snapshots this is not considered an error; this will result in 100% matching results. 24 | 25 | 2. Select sort order of output to be viewed using the drop downs labeled **'First by'** and **'Second by'**. If both buttons have the same values the default sort order of first: Namespace and, second: Name, will be used. 26 | 27 | 3. Select **View Results** using the drop down. Options are: All, Matching, and Non-matching. 28 | 29 | 4. Compare the snapshots by pressing the button labeled **'Compare snapshots'**. Once processing has completed the results are displayed in a scrollable table. 30 | 31 | 32 | 33 | ###### Viewing results: 34 | 35 | Assuming the 'All' option has been selected for View Results. Six columns of information are displayed: 36 | 37 | | Column | Description | 38 | |---|---| 39 | | Namespace | The defined namespace for the resource. If no namespace is defined the value 'clusterLevel' is displayed. | 40 | | Name | The name of the resource. | 41 | | Kind | An icon and type for the defined kind. | 42 | | Snapshot | Column indicates if the named resource is defined in both of the selected snapshots. Values are: (a) Both, (b) Snap 1 Only, and (c) Snap 2 Only. | 43 | | CreateTime | Column indicates if the resource 'creationTimestamp' value is the same for the resource. Valid values are (a) Y or (b) N. See NOTE 1. | 44 | | Spec Match | Column indicates if the resource 'spec' sections for the resources match. Valid values are (a) Y or (b) N. See NOTE 1. | 45 | 46 |
47 | 48 | Example output - 49 | 50 |
51 | 52 | 53 | 54 |

55 | 56 | **NOTE 1:** If the compared values for 'creationTimestamp' and 'spec' are missing in both of the compared snapshot files, this will be considered a match. Since the values are missing in both files, the display for the appropriate column(s) will be the value 'Y'. 57 | 58 | Clicking the icon in the Kind column will display the K8 Explain data for the selected icon. 59 | 60 | When the 'Matching' or 'Non-matching' options of the View Results drop down are selected the displayed rows in the output section are filtered accordingly. 61 | 62 | Clicking the values for Name or Namespace in any displayed line will open a modal screen with the contents of the files shown side-by-side that were compared. 63 | 64 | If the resource does not exist in both snapshots there will only be one file shown in the sid-by-side display. In the display the missing file will be identified with a box outlined in red with a question mark inside the box with the text '(No matching file)' shown alondside the box. 65 | 66 |
67 | 68 | Side-by-Side output - 69 | 70 |
71 | 72 | 73 | 74 |

75 | 76 | 77 | --- 78 | 79 | No video available at this time. 80 | 81 | 85 | 86 | --- 87 | 88 | 89 | 90 |   Next  91 |   TOC   92 |  Prev   93 | -------------------------------------------------------------------------------- /public/docs/docimages/3dView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/3dView.png -------------------------------------------------------------------------------- /public/docs/docimages/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/about.png -------------------------------------------------------------------------------- /public/docs/docimages/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/architecture.png -------------------------------------------------------------------------------- /public/docs/docimages/attribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/attribution.png -------------------------------------------------------------------------------- /public/docs/docimages/caroArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/caroArchitecture.png -------------------------------------------------------------------------------- /public/docs/docimages/caroGraphs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/caroGraphs.png -------------------------------------------------------------------------------- /public/docs/docimages/caroOther.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/caroOther.png -------------------------------------------------------------------------------- /public/docs/docimages/caroRoleBinding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/caroRoleBinding.png -------------------------------------------------------------------------------- /public/docs/docimages/caroSchematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/caroSchematic.png -------------------------------------------------------------------------------- /public/docs/docimages/circlePack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/circlePack.png -------------------------------------------------------------------------------- /public/docs/docimages/clusterTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/clusterTP.png -------------------------------------------------------------------------------- /public/docs/docimages/clusterTypeDataSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/clusterTypeDataSource.png -------------------------------------------------------------------------------- /public/docs/docimages/compareResults.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/compareResults.png -------------------------------------------------------------------------------- /public/docs/docimages/compareSideBySide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/compareSideBySide.png -------------------------------------------------------------------------------- /public/docs/docimages/connectedDataSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/connectedDataSource.png -------------------------------------------------------------------------------- /public/docs/docimages/dataSourceDropDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/dataSourceDropDown.png -------------------------------------------------------------------------------- /public/docs/docimages/decode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/decode.png -------------------------------------------------------------------------------- /public/docs/docimages/existingKubeDataSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/existingKubeDataSource.png -------------------------------------------------------------------------------- /public/docs/docimages/gettingStartedTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/gettingStartedTP.png -------------------------------------------------------------------------------- /public/docs/docimages/graphicsViewTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/graphicsViewTP.png -------------------------------------------------------------------------------- /public/docs/docimages/heirarchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/heirarchy.png -------------------------------------------------------------------------------- /public/docs/docimages/helpInfoConfigTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/helpInfoConfigTP.png -------------------------------------------------------------------------------- /public/docs/docimages/overviewTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/overviewTP.png -------------------------------------------------------------------------------- /public/docs/docimages/ownerRefLinksTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/ownerRefLinksTP.png -------------------------------------------------------------------------------- /public/docs/docimages/previousDataSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/previousDataSource.png -------------------------------------------------------------------------------- /public/docs/docimages/rbacDefs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/rbacDefs.png -------------------------------------------------------------------------------- /public/docs/docimages/rbacUsage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/rbacUsage.png -------------------------------------------------------------------------------- /public/docs/docimages/roleBindings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/roleBindings.png -------------------------------------------------------------------------------- /public/docs/docimages/schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/schematic.png -------------------------------------------------------------------------------- /public/docs/docimages/schematicsTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/schematicsTP.png -------------------------------------------------------------------------------- /public/docs/docimages/securityTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/securityTP.png -------------------------------------------------------------------------------- /public/docs/docimages/selectDataSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/selectDataSource.png -------------------------------------------------------------------------------- /public/docs/docimages/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/server.png -------------------------------------------------------------------------------- /public/docs/docimages/snapshotClusterInfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/snapshotClusterInfo.png -------------------------------------------------------------------------------- /public/docs/docimages/snapshotDone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/snapshotDone.png -------------------------------------------------------------------------------- /public/docs/docimages/snapshotName.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/snapshotName.png -------------------------------------------------------------------------------- /public/docs/docimages/snapshotStatsKind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/snapshotStatsKind.png -------------------------------------------------------------------------------- /public/docs/docimages/snapshotStatsNS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/snapshotStatsNS.png -------------------------------------------------------------------------------- /public/docs/docimages/snapshotTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/snapshotTP.png -------------------------------------------------------------------------------- /public/docs/docimages/statsDataSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/statsDataSource.png -------------------------------------------------------------------------------- /public/docs/docimages/storageTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/storageTP.png -------------------------------------------------------------------------------- /public/docs/docimages/tableOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/tableOptions.png -------------------------------------------------------------------------------- /public/docs/docimages/tableViewTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/tableViewTP.png -------------------------------------------------------------------------------- /public/docs/docimages/tableview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/tableview.png -------------------------------------------------------------------------------- /public/docs/docimages/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/thumbnail.png -------------------------------------------------------------------------------- /public/docs/docimages/userInterfaceClickIt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/userInterfaceClickIt.png -------------------------------------------------------------------------------- /public/docs/docimages/userInterfaceTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/userInterfaceTP.png -------------------------------------------------------------------------------- /public/docs/docimages/videoComingSoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/videoComingSoon.png -------------------------------------------------------------------------------- /public/docs/docimages/videoGettingStarted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/videoGettingStarted.png -------------------------------------------------------------------------------- /public/docs/docimages/vpk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/vpk.png -------------------------------------------------------------------------------- /public/docs/docimages/xrefTP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/xrefTP.png -------------------------------------------------------------------------------- /public/docs/docimages/xrefs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/xrefs.png -------------------------------------------------------------------------------- /public/docs/docimages/yamlEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/docs/docimages/yamlEditor.png -------------------------------------------------------------------------------- /public/docs/generalusage.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### User Interface and general usage 10 | 11 | --- 12 | 13 | User interface of VpK. 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | Vpk user interface (UI )is intended to provide graphical and tabular information with drill down capabilities. 23 | 24 | - If you see an icon, click on it. 25 | - If you see text with colored background, click on it. 26 | - If you see a blue or red circle in a hierarchy diagram, click on it. 27 | - If you see a blue circle in a circle pack diagram, click on it. 28 | - If you see a line of information in a tabular view, click on it. 29 | 30 | --- 31 | 32 |   Next  33 |   TOC   34 |  Prev   35 | -------------------------------------------------------------------------------- /public/docs/gettingstarted.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Getting started 10 | 11 | --- 12 | 13 | How to get started with VpK, installaing and starting. 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | Vpk is an application that runs on your computer using required software. The prerequiste software: 23 | 24 | - __browser__ - that supports html 5 for the user interface 25 | - __node.js and npm__ - install node packages and run the server software component 26 | - __kubectl__ - Kubernetes command line tool or other CLI used to communicate with a cluster 27 | 28 | 29 | VpK software is available from https://github.com/k8debug/vpk.git Clone the repo or download the zip. If using zip file, unzip file into a directory. 30 | 31 | Change to the directory where the software is cloned or copied and install the required node packages by running: npm install 32 | 33 | Start the software by running command: npm start 34 | 35 | Optionally VpK can be started with a different port. This requires the use of a different start command using node instead of npm. A start parameter "-p" is used to define the port. Example: 36 | 37 | node server.js -p 5400 38 | 39 | The above command starts the VpK server and hosts the application on port 5400. 40 | 41 | --- 42 | 43 |   Next  44 |   TOC   45 |  Prev   46 | 47 | -------------------------------------------------------------------------------- /public/docs/graphicview.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Graphic View 10 | 11 | --- 12 | 13 | Graphical views of defined resources. 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | Three graphical views are available: 23 | 24 | - Expandend hierarchy 25 | - Collapsible hierarchy 26 | - Circle pack 27 | 28 | All charts can be filtered to view one or more namespaces. Both hierarchy charts will have blue and red dots. These blue dots can be clicked on to expand or collapse the hierarchy view. Red dots can be clicked to view the associated resource yaml. 29 | 30 | Circle pack chart has pop-up information and the abiltiy to click the blue dots to view the resource yaml. 31 | 32 | --- 33 | 34 |   Next  35 |   TOC   36 |  Prev   37 | -------------------------------------------------------------------------------- /public/docs/overview.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Overview and architecture 10 | 11 | --- 12 | 13 | Overview video of VpK. 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | VpK was created as the result of wanting a tool to aid in understanding what is defined in Kubernetes. 23 | 24 | VpK is comprised of a server and browser components. The server component is a node.js application that communictes with running instances of K8 using the kubectl CLI application. When using K8 versions that require a custom CLI tool to query Kubernets, e.g. OpenShift, MicroK8s, etc. the associated tool is used to query the cluster. Using the kubectl api-resource command, a list of all known resources can be obtained. Using this information all K8 resources support the 'get' verb are quired using kubectl get. The output from the get requests used to create a seperate file for each unique resource. These files are created on the user laptop. At this point VpK no longer communicates with the K8 instance. 25 | 26 | The user interface (UI), browser component, provides graphical and tabular views of resources defined and deployed in the cluster. 27 | 28 | What is VpK? 29 | 30 | - VpK is designed to capture a point-in-time snapshot of the cluster. 31 | - Vpk provides the ability to view the captured snapshot in a disconnected fashion. Once the snapshot is created the user no longer needs to be connected to the cluster. 32 | - Vpk will __not__ modify a K8 cluster. It is designed as read-only. 33 | - VpK is __not__ a realtime monitoring tool. 34 | 35 | 36 | 37 | 38 | 39 | Application features include: 40 | 41 | - Access running K8 instances via CLI and saving results in locally stored directory. 42 | 43 | - The locally stored K8 query results allow disconnected use of VpK once a successful retrieval of K8 resource information. 44 | 45 | - Tabular viewing of resources with the abilty to filter by namespaces, kinds, labels, and resource names. 46 | 47 | - Fully expanded or collapsible hierarchial views of K8 resources. 48 | 49 | - Circlepack view of K8 resouces. 50 | 51 | - Schematic views of running workloads in the cluster. 52 | 53 | - Views of roles, bindings, and subject used to define RBAC. 54 | 55 | - Usage of RBAC definitions. 56 | 57 | - Create and view custom cross reference information of K8 resource elements. 58 | 59 | --- 60 | 61 |   Next  62 |   TOC   63 |  Prev   64 | -------------------------------------------------------------------------------- /public/docs/ownerref.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### OwnerReference 10 | 11 | --- 12 | 13 | Owner reference links provides a view of the owner reference chain. 14 | 15 | --- 16 | 17 |
18 | 20 |
21 | 22 | --- 23 | 24 | Viewing is selectable by Kind, Namespace, or Level. Level is a view that shows a defined number of links for the owner reference. If any Level 1 views will shown they will always have the highest level item without any viewable yaml. The owner reference is in the child resource but the identified parent resource could not be located to provide the yaml for viewing. 25 | 26 | 27 | 28 |   Next  29 |   TOC   30 |  Prev   31 | -------------------------------------------------------------------------------- /public/docs/schematics.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Schematics 10 | 11 | --- 12 | 13 | Interactive view of deployed workload and associated resoruces 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | Schematic views of running pods by namespace can be viewed. Mouse over the schematic for information for each icon. The icons can be clicked to view the resource yaml. 23 | 24 | The gray bar at the top of the schematic represents namespace level resources for the workload. The righthand side of the schematic has cluster level resources. 25 | 26 | __Click and icon__ to view the resource yaml. For resource kind _Secret_ there will be a screen allowing the ability to view the Secret yaml or the base64 information decoded. 27 | 28 | --- 29 | 30 |   Next  31 |   TOC   32 |  Prev   33 | -------------------------------------------------------------------------------- /public/docs/security.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Security 10 | 11 | --- 12 | 13 | Color coded views of roles, bindings, and subjects defined for RBAC. 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | Security is focused on RBAC (Role Based Access and Control) views. When viewing information presented in this section any text with color background can be __clicked on__. 23 | 24 | RBAC Definitions provides views for roles, rolebinding, and subjects at the namespace and cluster level. 25 | 26 | RBAC Usage provides a views of all bindings and subjects for where the role is defined. 27 | 28 | --- 29 | 30 |   Next  31 |   TOC   32 |  Prev   33 | -------------------------------------------------------------------------------- /public/docs/snapshot.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Snapshot 10 | 11 | --- 12 | 13 | Explaining the creation of snapshots that are used by VpK. 14 | 15 |
16 | 17 |
18 | 19 | --- 20 | 21 | Viewing any infomation within VpK requires the user to connect to a snapshot of K8 information. This should be the first task any time the application is started. Using the dropdown with the _"Select snapshot"_ value shown select the desired option. 22 | 23 |
24 | 25 | 26 | 27 |

28 | 29 | First time usage of VpK will have no existing snapshots. The __Running cluster__ option must be selected to create a snapahot. Once selected the user must choose how to connect to connect to the running K8 instance. It is __strongly__ recommended to use an existing kubectl connection. The user must connect to the cluster outside of the VpK application. Once the connection is established the snapshot can be created. Choose the __Existing kubectl connection__ option. 30 | 31 |
32 | 33 | 34 | 35 |

36 | 37 | Once the connection is established the snapshot can be created by pressing the __Connect__ button. The cluster snapshot is created and stored in a local directory. The base location for all snapshots is a directory named __cluster__ within the same location where the software is installed. A new snapshot directory within the base 'cluster' directroy is created for each new snapshot. The new snapshot directory will use the value provided for the "snapshot_prefix" field along with date and time appended. 38 | 39 |
40 | 41 | __Example snapshot directory name:__ kube-2020-11-27-14h-16m-46s 42 | 43 |
44 | 45 | 46 | 47 |

48 | 49 | 50 | When accessing a running Kubernetes cluster a series of processing messages will be displayed. The count message will have matching values once processing is complete. Returning to the main screen requires closing the modal dialog by pressing the _Close_ button. 51 | 52 | 53 | 54 |
55 | 56 | 57 | 58 |

59 | 60 | 61 | 62 | When returned to the home screen the newly connect snapshot is shown in the top portion of the screen. The complete directory path is shown. The displayed path can be selected or clicked to view statistics regarding the snapshot. 63 | 64 |
65 | 66 | 67 | 68 |

69 | 70 | Statistics are provided with a count for each resource kind within the cluster or count of resource kind within a namespace. 71 | 72 |
73 | 74 | 75 | 76 |
77 | 78 | 79 | 80 |

81 | 82 | 83 | --- 84 | 85 |   Next  86 |   TOC   87 |  Prev   88 | -------------------------------------------------------------------------------- /public/docs/storage.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Storage 10 | 11 | --- 12 | 13 | View of StroageClasses and requested space. 14 | 15 |
16 | 17 |
18 | 19 | --- 20 | 21 | Storage provides a view of the StorageClasses and the defined Persistent Volume requests and Persistent Volume Claims. The requrested space for each resource is shown. 22 | 23 | --- 24 | 25 |   Next  26 |   TOC   27 |  Prev   28 | -------------------------------------------------------------------------------- /public/docs/tableview.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### Table View 10 | 11 | --- 12 | 13 | Table view of resources. 14 | 15 |
16 | 17 |
18 | 19 | --- 20 | 21 | The table view provides a list of all K8 resources. Default view shown in the table displays three fields, namespace, kind, and name. 22 | 23 | Information displayed in the table can be __clicked on__ to view the associated resoure yaml. Filtering the view is available. Click the open filter button to select the filter types to be applied. More than one filter can be applied at the same time. 24 | 25 | __The user must press the Populate table button as the first task to view information in the table.__ 26 | 27 | --- 28 | 29 |   Next  30 |   TOC   31 |  Prev   32 | -------------------------------------------------------------------------------- /public/docs/toc.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ###### Table of Contents 4 | 5 | --- 6 | 7 | 8 | | Topic | Description | 9 | |---|---| 10 | | Getting started | Vpk installation and initial use | 11 | | User Interface | General usage of the UI | 12 | | Overview |  Vpk application overview an architecture | 13 | | Snapshot |  K8 data to analyze | 14 | | Table View |  Tabular view of K8 resources | 15 | | Graphic View |  Multiple graphic views of K8 resources | 16 | | Schematics |  Schematic graphs of workloads | 17 | | Security |  Roles, bindings, and subjects | 18 | | Storage |  StorageClass, PV and PVC | 19 | | Cluster |  Cluster level reaources | 20 | | X-Reference |  Cross reference Kubernetes resource object elements | 21 | | OwnerRef |  OwnerReference links | 22 | | Compare Snapshots |  Compare snapshots | 23 | 24 | --- 25 | 26 |   Next  27 |   TOC   28 |  Prev   29 | -------------------------------------------------------------------------------- /public/docs/xreference.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |   Next  6 |   TOC   7 |  Prev   8 | 9 | ###### X-Reference 10 | 11 | --- 12 | 13 | X-references and the creation of custom cross references for VpK. 14 | 15 |
16 | 18 |
19 | 20 | --- 21 | 22 | Users can define and create custom cross references refered to as an "xref". Each "xref" is defined to cross reference one or more Kubernetes resource object elements. The "xref" definition requires the user to provide the resouce object path to the element to be cross references. More than one path definitions can be defined for each "xref". 23 | 24 | An "xref" is defined with a name, description, K8 resource kind, and path. 25 | 26 | | Field | Values | 27 | |:---:|---| 28 | | name | Any alpha-numeric value without spaces or special characters. | 29 | | description | Brief description of xreff to help user understand what is being xref'd. | 30 | | kind | Kubernetes resource object kind. | 31 | | path | __a.__) A non-space value with periods serperating K8 resource object element names.
__b__.) Resource element names that are arrays must be defined with trailing square brackets containing a single asterisk __[*]__.
__c__.) The ending element of the xref defintion can require a matching value. This is accomplished by enclosing the required matching value in double curly brackets __{{value}}__.| 32 | 33 | One must understand the structure of the K8 resource yaml used to define the "xref" path definition. 34 | 35 | 36 | Examples of valid path definitons follow. Along with reference yaml that is provided to aid in understanding. All examples are based on an xref using kind of Pod. 37 | 38 | * Xref all metadata labels of env. 39 | 40 | ``` 41 | metadata.labels.env 42 | ``` 43 | 44 | * Xref the names of all secrets contained in volumes array. 45 | 46 | ``` 47 | volumes[*].secret.secretName 48 | ``` 49 | 50 | * Xref metadata labels for env with a required value of _prod_. 51 | 52 | ``` 53 | metadata.labels.env{{prod}} 54 | ``` 55 | 56 | * Xref all ConfigMap defintions that use a key named "ui-config" in container env valueFrom sections. 57 | 58 | ``` 59 | spec.containers[*].env[*].valueFrom.configMapKeyRef.key{{ui-config}} 60 | ``` 61 | 62 | __Reference YAML__ 63 | 64 | _(Portions of yaml content have been removed for example brevity, indicated by three periods.)_ 65 | 66 | ``` 67 | apiVersion: v1 68 | kind: Pod 69 | metadata: 70 | labels: 71 | app: dawtask 72 | env: prod 73 | name: dawtask-5b75b97896-94zgr 74 | namespace: daw 75 | ... 76 | uid: c8ebe1be-54b6-4af2-ba1e-8fd5ea7f1c46 77 | spec: 78 | containers: 79 | - env: 80 | - name: USERUI 81 | valueFrom: 82 | configMapKeyRef: 83 | key: ui-config 84 | name: dawtask-ui-config 85 | image: 'k8debug/daw-task:1.0.0' 86 | imagePullPolicy: Always 87 | name: dawtask 88 | ... 89 | volumes: 90 | - emptyDir: {} 91 | name: runner 92 | - name: dawtask-token-zx4f9 93 | secret: 94 | defaultMode: 420 95 | secretName: dawtask-token-zx4f9 96 | ... 97 | ``` 98 | 99 | --- 100 | 101 |   Next  102 |   TOC   103 |  Prev   104 | -------------------------------------------------------------------------------- /public/images/clouds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/clouds.jpg -------------------------------------------------------------------------------- /public/images/k8-flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/k8-flip.png -------------------------------------------------------------------------------- /public/images/k8/etcd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 43 | 45 | 46 | 48 | image/svg+xml 49 | 51 | 52 | 53 | 54 | 55 | 60 | 65 | etcd 76 | 82 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /public/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/loading.gif -------------------------------------------------------------------------------- /public/images/other/fluentd.svg: -------------------------------------------------------------------------------- 1 | Fluentd logo -------------------------------------------------------------------------------- /public/images/other/helm.svg: -------------------------------------------------------------------------------- 1 | Helm logo -------------------------------------------------------------------------------- /public/images/other/ibmold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/images/other/kong.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/images/other/launch-box.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | launch 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /public/images/other/ocp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/other/rancher.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 9 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /public/images/other/redhat.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /public/images/other/rook2.svg: -------------------------------------------------------------------------------- 1 | Rook logo -------------------------------------------------------------------------------- /public/images/other/unk.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 11 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /public/images/other/uparrow.svg: -------------------------------------------------------------------------------- 1 | 2 | up-arrow 3 | 4 | -------------------------------------------------------------------------------- /public/images/other/vpk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/other/vpk.png -------------------------------------------------------------------------------- /public/images/stars.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/stars.jpg -------------------------------------------------------------------------------- /public/images/vpk-flip.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/vpk-flip.gif -------------------------------------------------------------------------------- /public/images/vpk-flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/vpk-flip.png -------------------------------------------------------------------------------- /public/images/vpk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/vpk.png -------------------------------------------------------------------------------- /public/images/wow/pic-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-cluster.png -------------------------------------------------------------------------------- /public/images/wow/pic-comparesnapshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-comparesnapshots.png -------------------------------------------------------------------------------- /public/images/wow/pic-graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-graphic.png -------------------------------------------------------------------------------- /public/images/wow/pic-ownerref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-ownerref.png -------------------------------------------------------------------------------- /public/images/wow/pic-schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-schematic.png -------------------------------------------------------------------------------- /public/images/wow/pic-security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-security.png -------------------------------------------------------------------------------- /public/images/wow/pic-storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-storage.png -------------------------------------------------------------------------------- /public/images/wow/pic-tableview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/pic-tableview.png -------------------------------------------------------------------------------- /public/images/wow/wow-3dview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/wow-3dview.gif -------------------------------------------------------------------------------- /public/images/wow/wow-compare.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/wow-compare.gif -------------------------------------------------------------------------------- /public/images/wow/wow-graphics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/wow-graphics.gif -------------------------------------------------------------------------------- /public/images/wow/wow-rbac.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/wow-rbac.gif -------------------------------------------------------------------------------- /public/images/wow/wow-schematic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/wow-schematic.gif -------------------------------------------------------------------------------- /public/images/wow/wow-storage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/k8debug/vpk/c45d4baff77a487d59967b0f371d83bf2941ae44/public/images/wow/wow-storage.gif -------------------------------------------------------------------------------- /public/javascript/3rdparty/bootstrap-toggle.min.js: -------------------------------------------------------------------------------- 1 | /*\ 2 | |*| ======================================================================== 3 | |*| Bootstrap Toggle: bootstrap4-toggle.js v3.6.1 4 | |*| https://gitbrent.github.io/bootstrap4-toggle/ 5 | |*| ======================================================================== 6 | |*| Copyright 2018-2019 Brent Ely 7 | |*| Licensed under MIT 8 | |*| ======================================================================== 9 | \*/ 10 | !function(a){"use strict";function l(t,e){this.$element=a(t),this.options=a.extend({},this.defaults(),e),this.render()}l.VERSION="3.6.0",l.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"light",size:"normal",style:"",width:null,height:null},l.prototype.defaults=function(){return{on:this.$element.attr("data-on")||l.DEFAULTS.on,off:this.$element.attr("data-off")||l.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||l.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||l.DEFAULTS.offstyle,size:this.$element.attr("data-size")||l.DEFAULTS.size,style:this.$element.attr("data-style")||l.DEFAULTS.style,width:this.$element.attr("data-width")||l.DEFAULTS.width,height:this.$element.attr("data-height")||l.DEFAULTS.height}},l.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var t="large"===this.options.size||"lg"===this.options.size?"btn-lg":"small"===this.options.size||"sm"===this.options.size?"btn-sm":"mini"===this.options.size||"xs"===this.options.size?"btn-xs":"",e=a('