From d67fd71ea86a283c1148aa9c7077be39e29928e4 Mon Sep 17 00:00:00 2001 From: Mengting Yan Date: Wed, 3 Feb 2021 11:20:20 -0500 Subject: [PATCH] feat(plugins/plugin-kubectl): popeye dashboard Fixes #6949 --- .../config.d/notebooks.json | 5 +- .../krew/src/controller/popeye.ts | 69 +- plugins/plugin-kubectl/notebooks/popeye.json | 2710 +++++++++++++++++ .../src/non-headless-preload.ts | 3 +- 4 files changed, 2757 insertions(+), 30 deletions(-) create mode 100644 plugins/plugin-kubectl/notebooks/popeye.json diff --git a/plugins/plugin-client-default/config.d/notebooks.json b/plugins/plugin-client-default/config.d/notebooks.json index c4d0ed87ed1..209e9a57b36 100644 --- a/plugins/plugin-client-default/config.d/notebooks.json +++ b/plugins/plugin-client-default/config.d/notebooks.json @@ -22,7 +22,10 @@ }, { "label": "Dashboard", - "submenu": [{ "notebook": "Kubernetes Dashboard", "filepath": "/kui/kubernetes/dashboard.json" }] + "submenu": [ + { "notebook": "Kubernetes Dashboard", "filepath": "/kui/kubernetes/dashboard.json" }, + { "notebook": "Popeye Dashboard", "filepath": "/kui/kubernetes/popeye.json" } + ] }, { "type": "separator" }, { "notebook": "Make Your Own Notebook", "filepath": "/kui/make-notebook.json" } diff --git a/plugins/plugin-kubectl/krew/src/controller/popeye.ts b/plugins/plugin-kubectl/krew/src/controller/popeye.ts index e45c6af84cb..2f13bbe921a 100644 --- a/plugins/plugin-kubectl/krew/src/controller/popeye.ts +++ b/plugins/plugin-kubectl/krew/src/controller/popeye.ts @@ -58,33 +58,14 @@ function formatIssueRow(group: string, message: string, level: number) { name: group, attributes: [ { - key: 'Message', - value: message, + key: 'STATUS', + value: level === 3 ? 'Error' : level === 2 ? 'Warning' : 'OK', tag: 'badge', css: level === 3 ? 'red-background' : level === 2 ? 'yellow-background' : 'green-background' - } - ] - } -} - -function formatSectionRow( - displayName: string, - resourceName: string, - command: string, - sanitizer: string, - maxLevel: number, - ns: string -) { - return { - key: 'Name', - name: displayName, // e.g. split out the namespace in resourceName - onclick: `${command} popeye -s ${sanitizer} ${resourceName} -n ${ns}`, - attributes: [ + }, { - key: 'Max Level', - value: maxLevel.toString(), - tag: 'badge', - css: maxLevel === 3 ? 'red-background' : maxLevel === 2 ? 'yellow-background' : 'green-background' + key: 'Message', + value: message } ] } @@ -165,17 +146,49 @@ export default (command: string) => async (args: Arguments) => { */ const sectionTable = async () => { const body = [] - fullReport.sanitizers.forEach(({ issues, sanitizer }) => { + fullReport.sanitizers.forEach(({ issues, sanitizer, tally }) => { if (issues) { Object.entries(issues).forEach(([resourceName, issueList]) => { if (resourceName) { - let maxLevel = 0 - issueList.forEach(({ level }) => (maxLevel = level > maxLevel ? level : maxLevel)) - body.push(formatSectionRow(resourceName.split(/\//)[1], resourceName, command, sanitizer, maxLevel, ns)) + let status = 0 + issueList.forEach(({ level }) => (status = level > status ? level : status)) + const shortNames = resourceName.split(/\//) + + body.push({ + key: 'Name', + name: shortNames.length > 1 ? shortNames[1] : shortNames[0], // e.g. split out the namespace in resourceName + onclick: `${command} popeye -s ${sanitizer} ${resourceName} -n ${ns}`, + attributes: [ + { + key: 'Status', + value: status === 3 ? 'Error' : status === 2 ? 'Warning' : 'OK', + tag: 'badge', + css: status === 3 ? 'red-background' : status === 2 ? 'yellow-background' : 'green-background' + } + ] + }) } else { issueList.forEach(_ => body.push(formatIssueRow(_.group, _.message, _.level))) } }) + } else { + // no issues, return the tally of this sanitizer + body.push({ + key: 'Name', + name: sanitizer, + attributes: [ + { + key: 'Score', + value: tally.score.toString(), + tag: 'badge', + css: tally.score === 100 ? 'green-background' : 'red-background' + }, + { key: 'Error', value: tally.error.toString() }, + { key: 'Warning', value: tally.warning.toString() }, + { key: 'Info', value: tally.info.toString() }, + { key: 'Ok', value: tally.ok.toString() } + ] + }) } }) diff --git a/plugins/plugin-kubectl/notebooks/popeye.json b/plugins/plugin-kubectl/notebooks/popeye.json new file mode 100644 index 00000000000..61ccc549de2 --- /dev/null +++ b/plugins/plugin-kubectl/notebooks/popeye.json @@ -0,0 +1,2710 @@ +{ + "apiVersion": "kui-shell/v1", + "kind": "Notebook", + "metadata": { + "name": "Popeye Dashboard" + }, + "spec": { + "splits": [ + { + "uuid": "2_c57e811f-2da8-557e-a402-9f0950407675", + "blocks": [ + { + "response": { + "header": { + "key": "Name", + "name": "Name", + "attributes": [ + { + "key": "Score", + "value": "Score" + }, + { + "key": "Error", + "value": "Error" + }, + { + "key": "Warning", + "value": "Warning" + }, + { + "key": "Info", + "value": "Info" + }, + { + "key": "Ok", + "value": "Ok" + } + ] + }, + "body": [ + { + "key": "Name", + "name": "cluster", + "onclick": "kubectl popeye -s cluster -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "clusterrole", + "onclick": "kubectl popeye -s clusterrole -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "59" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "clusterrolebinding", + "onclick": "kubectl popeye -s clusterrolebinding -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "configmap", + "onclick": "kubectl popeye -s configmap -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "2" + } + ] + }, + { + "key": "Name", + "name": "daemonset", + "onclick": "kubectl popeye -s daemonset -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "deployment", + "onclick": "kubectl popeye -s deployment -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "6" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "horizontalpodautoscaler", + "onclick": "kubectl popeye -s horizontalpodautoscaler -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "1" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "ingress", + "onclick": "kubectl popeye -s ingress -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "namespace", + "onclick": "kubectl popeye -s namespace -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "networkpolicy", + "onclick": "kubectl popeye -s networkpolicy -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "persistentvolume", + "onclick": "kubectl popeye -s persistentvolume -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "persistentvolumeclaim", + "onclick": "kubectl popeye -s persistentvolumeclaim -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "pod", + "onclick": "kubectl popeye -s pod -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "1" + }, + { + "key": "Warning", + "value": "12" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "poddisruptionbudget", + "onclick": "kubectl popeye -s poddisruptionbudget -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "podsecuritypolicy", + "onclick": "kubectl popeye -s podsecuritypolicy -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "replicaset", + "onclick": "kubectl popeye -s replicaset -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "6" + } + ] + }, + { + "key": "Name", + "name": "role", + "onclick": "kubectl popeye -s role -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "rolebinding", + "onclick": "kubectl popeye -s rolebinding -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "secret", + "onclick": "kubectl popeye -s secret -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "2" + }, + { + "key": "Ok", + "value": "2" + } + ] + }, + { + "key": "Name", + "name": "service", + "onclick": "kubectl popeye -s service -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "4" + }, + { + "key": "Ok", + "value": "3" + } + ] + }, + { + "key": "Name", + "name": "serviceaccount", + "onclick": "kubectl popeye -s serviceaccount -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "2" + } + ] + }, + { + "key": "Name", + "name": "statefulset", + "onclick": "kubectl popeye -s statefulset -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "1" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "All resources", + "footer": ["Overall score: 81 B"], + "defaultPresentation": "grid" + }, + "historyIdx": 13, + "cwd": "~/Workspace4/kui", + "command": "k popeye", + "startEvent": { + "route": "/kubeui/k/popeye", + "startTime": 1612385004590, + "command": "k popeye", + "evaluatorOptions": { + "flags": { + "configuration": { + "short-option-groups": false, + "duplicate-arguments-array": false + }, + "narg": { + "w": 0, + "watch": 0, + "watch-only": 0 + }, + "boolean": [ + "w", + "watch", + "watch-only", + "A", + "all-namespaces", + "ignore-not-found", + "no-headers", + "i", + "it", + "ti", + "stdin", + "t", + "tty", + "R", + "recursive", + "server-print", + "show-kind", + "show-labels" + ] + }, + "plugin": "plugin-kubectl/krew" + }, + "execType": 3, + "execUUID": "52bc2415-7425-4ba9-b51d-b78cec4dace8", + "execOptions": { + "echo": true, + "type": 3, + "execUUID": "52bc2415-7425-4ba9-b51d-b78cec4dace8", + "history": 13, + "env": {} + }, + "echo": true + }, + "completeEvent": { + "execType": 3, + "completeTime": 1612385005699, + "command": "k popeye", + "argvNoOptions": ["k", "popeye"], + "parsedOptions": { + "_": ["k", "popeye"] + }, + "execUUID": "52bc2415-7425-4ba9-b51d-b78cec4dace8", + "cancelled": false, + "echo": true, + "evaluatorOptions": { + "plugin": "plugin-kubectl/krew" + }, + "execOptions": { + "echo": true, + "type": 3, + "execUUID": "52bc2415-7425-4ba9-b51d-b78cec4dace8", + "history": 13, + "env": {} + }, + "response": { + "header": { + "key": "Name", + "name": "Name", + "attributes": [ + { + "key": "Score", + "value": "Score" + }, + { + "key": "Error", + "value": "Error" + }, + { + "key": "Warning", + "value": "Warning" + }, + { + "key": "Info", + "value": "Info" + }, + { + "key": "Ok", + "value": "Ok" + } + ] + }, + "body": [ + { + "key": "Name", + "name": "cluster", + "onclick": "kubectl popeye -s cluster -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "clusterrole", + "onclick": "kubectl popeye -s clusterrole -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "59" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "clusterrolebinding", + "onclick": "kubectl popeye -s clusterrolebinding -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "configmap", + "onclick": "kubectl popeye -s configmap -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "2" + } + ] + }, + { + "key": "Name", + "name": "daemonset", + "onclick": "kubectl popeye -s daemonset -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "deployment", + "onclick": "kubectl popeye -s deployment -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "6" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "horizontalpodautoscaler", + "onclick": "kubectl popeye -s horizontalpodautoscaler -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "1" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "ingress", + "onclick": "kubectl popeye -s ingress -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "namespace", + "onclick": "kubectl popeye -s namespace -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "networkpolicy", + "onclick": "kubectl popeye -s networkpolicy -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "persistentvolume", + "onclick": "kubectl popeye -s persistentvolume -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "persistentvolumeclaim", + "onclick": "kubectl popeye -s persistentvolumeclaim -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "1" + } + ] + }, + { + "key": "Name", + "name": "pod", + "onclick": "kubectl popeye -s pod -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "1" + }, + { + "key": "Warning", + "value": "12" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "poddisruptionbudget", + "onclick": "kubectl popeye -s poddisruptionbudget -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "podsecuritypolicy", + "onclick": "kubectl popeye -s podsecuritypolicy -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "replicaset", + "onclick": "kubectl popeye -s replicaset -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "6" + } + ] + }, + { + "key": "Name", + "name": "role", + "onclick": "kubectl popeye -s role -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "rolebinding", + "onclick": "kubectl popeye -s rolebinding -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + }, + { + "key": "Name", + "name": "secret", + "onclick": "kubectl popeye -s secret -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "2" + }, + { + "key": "Ok", + "value": "2" + } + ] + }, + { + "key": "Name", + "name": "service", + "onclick": "kubectl popeye -s service -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "4" + }, + { + "key": "Ok", + "value": "3" + } + ] + }, + { + "key": "Name", + "name": "serviceaccount", + "onclick": "kubectl popeye -s serviceaccount -n default", + "attributes": [ + { + "key": "Score", + "value": "100", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "0" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "2" + } + ] + }, + { + "key": "Name", + "name": "statefulset", + "onclick": "kubectl popeye -s statefulset -n default", + "attributes": [ + { + "key": "Score", + "value": "0", + "tag": "badge", + "css": "red-background" + }, + { + "key": "Error", + "value": "0" + }, + { + "key": "Warning", + "value": "1" + }, + { + "key": "Info", + "value": "0" + }, + { + "key": "Ok", + "value": "0" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "All resources", + "footer": ["Overall score: 81 B"], + "defaultPresentation": "grid" + }, + "responseType": "ScalarResponse", + "historyIdx": 13 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "52bc2415-7425-4ba9-b51d-b78cec4dace8", + "startTime": 1612385004590, + "outputOnly": false, + "state": "valid-response" + } + ] + }, + { + "uuid": "2_0a9586b6-2f57-5d3b-9619-b5cdb6a76d53", + "blocks": [ + { + "response": { + "header": { + "key": "Name", + "name": "Name", + "attributes": [ + { + "key": "Status", + "value": "Status" + } + ] + }, + "body": [ + { + "key": "Name", + "name": "frontend-6c6d6dfd4d-gtj4w", + "onclick": "kubectl popeye -s pod default/frontend-6c6d6dfd4d-gtj4w -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "frontend-6c6d6dfd4d-pxvlx", + "onclick": "kubectl popeye -s pod default/frontend-6c6d6dfd4d-pxvlx -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "frontend-6c6d6dfd4d-rmnp8", + "onclick": "kubectl popeye -s pod default/frontend-6c6d6dfd4d-rmnp8 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "kui-crashy", + "onclick": "kubectl popeye -s pod default/kui-crashy -n default", + "attributes": [ + { + "key": "Status", + "value": "Error", + "tag": "badge", + "css": "red-background" + } + ] + }, + { + "key": "Name", + "name": "myapp-5f96cd6867-2kdt5", + "onclick": "kubectl popeye -s pod default/myapp-5f96cd6867-2kdt5 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "nginx-deployment-67dfd6c8f9-hcxgb", + "onclick": "kubectl popeye -s pod default/nginx-deployment-67dfd6c8f9-hcxgb -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-master-f46ff57fd-5qhn9", + "onclick": "kubectl popeye -s pod default/redis-master-f46ff57fd-5qhn9 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-slave-bbc7f655d-f72rh", + "onclick": "kubectl popeye -s pod default/redis-slave-bbc7f655d-f72rh -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-slave-bbc7f655d-n8ghx", + "onclick": "kubectl popeye -s pod default/redis-slave-bbc7f655d-n8ghx -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment-75b9678fbb-752pm", + "onclick": "kubectl popeye -s pod default/the-deployment-75b9678fbb-752pm -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment-75b9678fbb-kcn8g", + "onclick": "kubectl popeye -s pod default/the-deployment-75b9678fbb-kcn8g -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment-75b9678fbb-xt2w4", + "onclick": "kubectl popeye -s pod default/the-deployment-75b9678fbb-xt2w4 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "yo-mysql-0", + "onclick": "kubectl popeye -s pod default/yo-mysql-0 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "Pod", + "footer": ["Overall score: 0 F"] + }, + "historyIdx": 15, + "cwd": "~/Workspace4/kui", + "command": "k popeye -s pod", + "startEvent": { + "route": "/kubeui/k/popeye", + "startTime": 1612385005934, + "command": "k popeye -s pod", + "evaluatorOptions": { + "flags": { + "configuration": { + "short-option-groups": false, + "duplicate-arguments-array": false + }, + "narg": { + "w": 0, + "watch": 0, + "watch-only": 0 + }, + "boolean": [ + "w", + "watch", + "watch-only", + "A", + "all-namespaces", + "ignore-not-found", + "no-headers", + "i", + "it", + "ti", + "stdin", + "t", + "tty", + "R", + "recursive", + "server-print", + "show-kind", + "show-labels" + ] + }, + "plugin": "plugin-kubectl/krew" + }, + "execType": 3, + "execUUID": "2f778fd4-85a5-45da-bfc4-404bdf3ba75e", + "execOptions": { + "echo": true, + "type": 3, + "execUUID": "2f778fd4-85a5-45da-bfc4-404bdf3ba75e", + "history": 15, + "env": {} + }, + "echo": true + }, + "completeEvent": { + "execType": 3, + "completeTime": 1612385006215, + "command": "k popeye -s pod", + "argvNoOptions": ["k", "popeye"], + "parsedOptions": { + "_": ["k", "popeye"], + "s": "pod" + }, + "execUUID": "2f778fd4-85a5-45da-bfc4-404bdf3ba75e", + "cancelled": false, + "echo": true, + "evaluatorOptions": { + "plugin": "plugin-kubectl/krew" + }, + "execOptions": { + "echo": true, + "type": 3, + "execUUID": "2f778fd4-85a5-45da-bfc4-404bdf3ba75e", + "history": 15, + "env": {} + }, + "response": { + "header": { + "key": "Name", + "name": "Name", + "attributes": [ + { + "key": "Status", + "value": "Status" + } + ] + }, + "body": [ + { + "key": "Name", + "name": "frontend-6c6d6dfd4d-gtj4w", + "onclick": "kubectl popeye -s pod default/frontend-6c6d6dfd4d-gtj4w -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "frontend-6c6d6dfd4d-pxvlx", + "onclick": "kubectl popeye -s pod default/frontend-6c6d6dfd4d-pxvlx -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "frontend-6c6d6dfd4d-rmnp8", + "onclick": "kubectl popeye -s pod default/frontend-6c6d6dfd4d-rmnp8 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "kui-crashy", + "onclick": "kubectl popeye -s pod default/kui-crashy -n default", + "attributes": [ + { + "key": "Status", + "value": "Error", + "tag": "badge", + "css": "red-background" + } + ] + }, + { + "key": "Name", + "name": "myapp-5f96cd6867-2kdt5", + "onclick": "kubectl popeye -s pod default/myapp-5f96cd6867-2kdt5 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "nginx-deployment-67dfd6c8f9-hcxgb", + "onclick": "kubectl popeye -s pod default/nginx-deployment-67dfd6c8f9-hcxgb -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-master-f46ff57fd-5qhn9", + "onclick": "kubectl popeye -s pod default/redis-master-f46ff57fd-5qhn9 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-slave-bbc7f655d-f72rh", + "onclick": "kubectl popeye -s pod default/redis-slave-bbc7f655d-f72rh -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-slave-bbc7f655d-n8ghx", + "onclick": "kubectl popeye -s pod default/redis-slave-bbc7f655d-n8ghx -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment-75b9678fbb-752pm", + "onclick": "kubectl popeye -s pod default/the-deployment-75b9678fbb-752pm -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment-75b9678fbb-kcn8g", + "onclick": "kubectl popeye -s pod default/the-deployment-75b9678fbb-kcn8g -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment-75b9678fbb-xt2w4", + "onclick": "kubectl popeye -s pod default/the-deployment-75b9678fbb-xt2w4 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "yo-mysql-0", + "onclick": "kubectl popeye -s pod default/yo-mysql-0 -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "Pod", + "footer": ["Overall score: 0 F"] + }, + "responseType": "ScalarResponse", + "historyIdx": 15 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "2f778fd4-85a5-45da-bfc4-404bdf3ba75e", + "startTime": 1612385005934, + "outputOnly": false, + "state": "valid-response" + } + ] + }, + { + "uuid": "2_cd0d8750-9c3b-5e47-bb06-8b8fe6c85bfb", + "blocks": [ + { + "response": { + "header": { + "key": "Name", + "name": "Name", + "attributes": [ + { + "key": "Status", + "value": "Status" + } + ] + }, + "body": [ + { + "key": "Name", + "name": "frontend", + "onclick": "kubectl popeye -s deployment default/frontend -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "myapp", + "onclick": "kubectl popeye -s deployment default/myapp -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "nginx-deployment", + "onclick": "kubectl popeye -s deployment default/nginx-deployment -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-master", + "onclick": "kubectl popeye -s deployment default/redis-master -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-slave", + "onclick": "kubectl popeye -s deployment default/redis-slave -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment", + "onclick": "kubectl popeye -s deployment default/the-deployment -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "Deployment", + "footer": ["Overall score: 0 F"] + }, + "historyIdx": 16, + "cwd": "~/Workspace4/kui", + "command": "k popeye -s deployment", + "startEvent": { + "route": "/kubeui/k/popeye", + "startTime": 1612386499531, + "command": "k popeye -s deployment", + "evaluatorOptions": { + "flags": { + "configuration": { + "short-option-groups": false, + "duplicate-arguments-array": false + }, + "narg": { + "w": 0, + "watch": 0, + "watch-only": 0 + }, + "boolean": [ + "w", + "watch", + "watch-only", + "A", + "all-namespaces", + "ignore-not-found", + "no-headers", + "i", + "it", + "ti", + "stdin", + "t", + "tty", + "R", + "recursive", + "server-print", + "show-kind", + "show-labels" + ] + }, + "plugin": "plugin-kubectl/krew" + }, + "execType": 3, + "execUUID": "cc82ff8f-b210-402a-b9ca-5c4311c605ee", + "execOptions": { + "echo": true, + "type": 3, + "execUUID": "cc82ff8f-b210-402a-b9ca-5c4311c605ee", + "history": 16, + "env": {} + }, + "echo": true + }, + "completeEvent": { + "execType": 3, + "completeTime": 1612386499955, + "command": "k popeye -s deployment", + "argvNoOptions": ["k", "popeye"], + "parsedOptions": { + "_": ["k", "popeye"], + "s": "deployment" + }, + "execUUID": "cc82ff8f-b210-402a-b9ca-5c4311c605ee", + "cancelled": false, + "echo": true, + "evaluatorOptions": { + "plugin": "plugin-kubectl/krew" + }, + "execOptions": { + "echo": true, + "type": 3, + "execUUID": "cc82ff8f-b210-402a-b9ca-5c4311c605ee", + "history": 16, + "env": {} + }, + "response": { + "header": { + "key": "Name", + "name": "Name", + "attributes": [ + { + "key": "Status", + "value": "Status" + } + ] + }, + "body": [ + { + "key": "Name", + "name": "frontend", + "onclick": "kubectl popeye -s deployment default/frontend -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "myapp", + "onclick": "kubectl popeye -s deployment default/myapp -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "nginx-deployment", + "onclick": "kubectl popeye -s deployment default/nginx-deployment -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-master", + "onclick": "kubectl popeye -s deployment default/redis-master -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "redis-slave", + "onclick": "kubectl popeye -s deployment default/redis-slave -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + }, + { + "key": "Name", + "name": "the-deployment", + "onclick": "kubectl popeye -s deployment default/the-deployment -n default", + "attributes": [ + { + "key": "Status", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "Deployment", + "footer": ["Overall score: 0 F"] + }, + "responseType": "ScalarResponse", + "historyIdx": 16 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "cc82ff8f-b210-402a-b9ca-5c4311c605ee", + "startTime": 1612386499531, + "outputOnly": false, + "state": "valid-response" + } + ] + }, + { + "uuid": "2_8205f6b8-87bf-5679-ac83-e3519c17d89c", + "blocks": [ + { + "response": { + "apiVersion": "kui-shell/v1", + "kind": "CommentaryResponse", + "props": { + "children": "# Kubernetes Sanity Dashboard with Popeye\n\nIn this dashboard, **Kui** offers three **Popeye** checkers that are pinned in the terminals above. In the upper left table view, Kui visualizes the Popeye report of your **entire cluster** where each cell represents a resource, and colors indicate the report result of that resource. You can *hover* on those cells to see the *resource details*, and *click* to get a full report of that resource. For example, table views in the upper middle and upper right (**Pods** and **Deployments**) are both from clicking the first view. You can further drilldown these views to see a list of issues. \n\n" + } + }, + "historyIdx": 250, + "cwd": "~/Workspace4/kui", + "command": "# # Kubernetes Sanity Dashboard with Popeye\\n\\nIn this dashboard, **Kui** offers three **Popeye** checkers that are pinned in the terminals above. In the upper left table view, Kui visualizes the Popeye report of your **entire cluster** where each cell represents a resource, and colors indicate the report result of that resource. You can *hover* on those cells to see the *resource details*, and *click* to get a full report of that resource. For example, table views in the upper middle and upper right (**Pods** and **Deployments**) are both from clicking the first view. You can further drilldown these views to see a list of issues. \\n\\n", + "startEvent": { + "route": "/#", + "startTime": 1612382419706, + "command": "# # Kubernetes Sanity Dashboard with Popeye\\n\\nIn this dashboard, **Kui** offers three **Popeye** checkers that are pinned in the terminals above. In the upper left table view, Kui visualizes the Popeye report of your **entire cluster** where each cell represents a resource, and colors indicate the report result of that resource. You can *hover* on those cells to see the *resource details*, and *click* to get a full report of that resource. For example, table views in the upper middle and upper right (**Pods** and **Deployments**) are both from clicking the first view. You can further drilldown these views to see a list of issues. \\n\\n", + "evaluatorOptions": { + "usage": { + "command": "commentary", + "strict": "commentary", + "example": "commentary -f []", + "docs": "Commentary", + "optional": [ + { + "name": "--title", + "alias": "-t", + "docs": "Title for the commentary" + }, + { + "name": "--file", + "alias": "-f", + "docs": "File that contains the texts" + } + ] + }, + "outputOnly": true, + "plugin": "plugin-client-common" + }, + "execType": 0, + "execUUID": "4e0c26b5-d160-4a2e-ab3d-422e373bd67a", + "execOptions": { + "type": 0, + "language": "en-US", + "execUUID": "4e0c26b5-d160-4a2e-ab3d-422e373bd67a", + "history": 250, + "env": {} + } + }, + "completeEvent": { + "execType": 0, + "completeTime": 1612382419715, + "command": "# # Kubernetes Sanity Dashboard with Popeye\\n\\nIn this dashboard, **Kui** offers three **Popeye** checkers that are pinned in the terminals above. In the upper left table view, Kui visualizes the Popeye report of your **entire cluster** where each cell represents a resource, and colors indicate the report result of that resource. You can *hover* on those cells to see the *resource details*, and *click* to get a full report of that resource. For example, table views in the upper middle and upper right (**Pods** and **Deployments**) are both from clicking the first view. You can further drilldown these views to see a list of issues. \\n\\n", + "argvNoOptions": ["#"], + "parsedOptions": { + "_": ["#"] + }, + "execUUID": "4e0c26b5-d160-4a2e-ab3d-422e373bd67a", + "cancelled": false, + "evaluatorOptions": { + "outputOnly": true, + "plugin": "plugin-client-common" + }, + "execOptions": { + "type": 0, + "language": "en-US", + "execUUID": "4e0c26b5-d160-4a2e-ab3d-422e373bd67a", + "history": 250, + "env": {} + }, + "response": { + "apiVersion": "kui-shell/v1", + "kind": "CommentaryResponse", + "props": { + "children": "# Popeye Dashboard\n\nPopeye will scan the complete cluster and report back with issues related to configurations and resources. It helps you execute the best practices on the Kubernetes cluster to stay away from common issues.\n\nUsing Popeye, you can easily identify dead and unused resources, port mismatches, RBAC rules, metrics utilization, and much more.\n\nKui offers three pinned popeye check in the terminals above.\n1. Check all resources in your cluster.\n2. Check Pods in your cluster.\n3. Check Deployments in your cluster." + } + }, + "responseType": "ScalarResponse", + "historyIdx": 250 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "4e0c26b5-d160-4a2e-ab3d-422e373bd67a", + "startTime": 1612382419706, + "outputOnly": true, + "state": "valid-response" + }, + { + "response": { + "apiVersion": "kui-shell/v1", + "kind": "CommentaryResponse", + "props": { + "children": "#### Example of drilling down the Pods report in the upper middle terminal:" + } + }, + "historyIdx": 14, + "cwd": "~/Workspace4/kui", + "command": "# #### Example of drilling down the Pods report in the upper middle terminal:", + "startEvent": { + "route": "/#", + "startTime": 1612386699074, + "command": "# #### Example of drilling down the Pods report in the upper middle terminal:", + "evaluatorOptions": { + "usage": { + "command": "commentary", + "strict": "commentary", + "example": "commentary -f []", + "docs": "Commentary", + "optional": [ + { + "name": "--title", + "alias": "-t", + "docs": "Title for the commentary" + }, + { + "name": "--file", + "alias": "-f", + "docs": "File that contains the texts" + } + ] + }, + "outputOnly": true, + "plugin": "plugin-client-common" + }, + "execType": 0, + "execUUID": "74d70eb9-2146-4811-89bb-ed78f61e3d89", + "execOptions": { + "type": 0, + "language": "en-US", + "execUUID": "160e5f5a-ed60-4c37-a8ab-500dd3291a2e", + "history": 14, + "env": {} + } + }, + "completeEvent": { + "execType": 0, + "completeTime": 1612386699090, + "command": "# #### Example of drilling down the Pods report in the upper middle terminal:", + "argvNoOptions": ["#"], + "parsedOptions": { + "_": ["#"] + }, + "execUUID": "74d70eb9-2146-4811-89bb-ed78f61e3d89", + "cancelled": false, + "evaluatorOptions": { + "outputOnly": true, + "plugin": "plugin-client-common" + }, + "execOptions": { + "type": 0, + "language": "en-US", + "execUUID": "160e5f5a-ed60-4c37-a8ab-500dd3291a2e", + "history": 14, + "env": {} + }, + "response": { + "apiVersion": "kui-shell/v1", + "kind": "CommentaryResponse", + "props": { + "children": "#### Example of drilling down the Pods report in the upper middle terminal:" + } + }, + "responseType": "ScalarResponse", + "historyIdx": 14 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "74d70eb9-2146-4811-89bb-ed78f61e3d89", + "startTime": 1612386699074, + "outputOnly": true, + "state": "valid-response" + }, + { + "response": { + "header": { + "key": "Group", + "name": "Group", + "attributes": [ + { + "key": "STATUS", + "value": "STATUS" + }, + { + "key": "Message", + "value": "Message" + } + ] + }, + "body": [ + { + "key": "Group", + "name": "slave", + "attributes": [ + { + "key": "STATUS", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + }, + { + "key": "Message", + "value": "[POP-107] No resource limits defined" + } + ] + }, + { + "key": "Group", + "name": "slave", + "attributes": [ + { + "key": "STATUS", + "value": "OK", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Message", + "value": "[POP-108] Unnamed port 6379" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "redis-slave" + }, + "historyIdx": 75, + "cwd": "~/Workspace4/kui", + "command": "kubectl popeye -s deployment default/redis-slave -n default", + "startEvent": { + "route": "/kubeui/kubectl/popeye", + "startTime": 1612386467496, + "command": "kubectl popeye -s deployment default/redis-slave -n default", + "evaluatorOptions": { + "flags": { + "configuration": { + "short-option-groups": false, + "duplicate-arguments-array": false + }, + "narg": { + "w": 0, + "watch": 0, + "watch-only": 0 + }, + "boolean": [ + "w", + "watch", + "watch-only", + "A", + "all-namespaces", + "ignore-not-found", + "no-headers", + "i", + "it", + "ti", + "stdin", + "t", + "tty", + "R", + "recursive", + "server-print", + "show-kind", + "show-labels" + ] + }, + "plugin": "plugin-kubectl/krew" + }, + "execType": 1, + "execUUID": "c285c6c0-dda3-496e-a1c7-0bc120754e06", + "execOptions": { + "echo": true, + "type": 1, + "execUUID": "75cbe62c-8fa2-4d84-b4e6-351fcd251cd4", + "history": 75, + "env": {} + }, + "echo": true + }, + "completeEvent": { + "execType": 1, + "completeTime": 1612386468059, + "command": "kubectl popeye -s deployment default/redis-slave -n default", + "argvNoOptions": ["kubectl", "popeye", "default/redis-slave"], + "parsedOptions": { + "_": ["kubectl", "popeye", "default/redis-slave"], + "s": "deployment", + "n": "default" + }, + "execUUID": "c285c6c0-dda3-496e-a1c7-0bc120754e06", + "cancelled": false, + "echo": true, + "evaluatorOptions": { + "plugin": "plugin-kubectl/krew" + }, + "execOptions": { + "echo": true, + "type": 1, + "execUUID": "75cbe62c-8fa2-4d84-b4e6-351fcd251cd4", + "history": 75, + "env": {} + }, + "response": { + "header": { + "key": "Group", + "name": "Group", + "attributes": [ + { + "key": "STATUS", + "value": "STATUS" + }, + { + "key": "Message", + "value": "Message" + } + ] + }, + "body": [ + { + "key": "Group", + "name": "slave", + "attributes": [ + { + "key": "STATUS", + "value": "Warning", + "tag": "badge", + "css": "yellow-background" + }, + { + "key": "Message", + "value": "[POP-107] No resource limits defined" + } + ] + }, + { + "key": "Group", + "name": "slave", + "attributes": [ + { + "key": "STATUS", + "value": "OK", + "tag": "badge", + "css": "green-background" + }, + { + "key": "Message", + "value": "[POP-108] Unnamed port 6379" + } + ] + } + ], + "statusColumnIdx": 0, + "breadcrumbs": [ + { + "label": "Popeye" + }, + { + "label": "default" + } + ], + "title": "redis-slave" + }, + "responseType": "ScalarResponse", + "historyIdx": 75 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "c285c6c0-dda3-496e-a1c7-0bc120754e06", + "startTime": 1612386467496, + "outputOnly": false, + "state": "valid-response" + } + ] + }, + { + "uuid": "2_de257cab-7893-5d39-9f8c-248a88026a18", + "blocks": [ + { + "response": { + "apiVersion": "kui-shell/v1", + "kind": "CommentaryResponse", + "props": { + "children": "**Note:** This notebook is not fresh. If you have Popeye installed, hover on the commands above and click the refresh button.\n\n#### Clicking cells in the table views above will show details below:\n" + } + }, + "historyIdx": 76, + "cwd": "~/Workspace4/kui", + "command": "# **Note:** This notebook is not fresh. If you have Popeye installed, hover on the commands above and click the refresh button.\\n\\n#### Clicking cells in the table views above will show details below:\\n", + "startEvent": { + "route": "/#", + "startTime": 1612386630740, + "command": "# **Note:** This notebook is not fresh. If you have Popeye installed, hover on the commands above and click the refresh button.\\n\\n#### Clicking cells in the table views above will show details below:\\n", + "evaluatorOptions": { + "usage": { + "command": "commentary", + "strict": "commentary", + "example": "commentary -f []", + "docs": "Commentary", + "optional": [ + { + "name": "--title", + "alias": "-t", + "docs": "Title for the commentary" + }, + { + "name": "--file", + "alias": "-f", + "docs": "File that contains the texts" + } + ] + }, + "outputOnly": true, + "plugin": "plugin-client-common" + }, + "execType": 1, + "execUUID": "55e8c1ca-b9c8-4fda-960b-eeb6ee8b290e", + "execOptions": { + "echo": true, + "type": 1, + "execUUID": "55e8c1ca-b9c8-4fda-960b-eeb6ee8b290e", + "history": 76, + "env": {} + }, + "echo": true + }, + "completeEvent": { + "execType": 1, + "completeTime": 1612386630759, + "command": "# **Note:** This notebook is not fresh. If you have Popeye installed, hover on the commands above and click the refresh button.\\n\\n#### Clicking cells in the table views above will show details below:\\n", + "argvNoOptions": [ + "#", + " ### Clicking cells above, and details like this will show in the terminal on the right." + ], + "parsedOptions": { + "_": ["#", " ### Clicking cells above, and details like this will show in the terminal on the right."] + }, + "execUUID": "55e8c1ca-b9c8-4fda-960b-eeb6ee8b290e", + "cancelled": false, + "echo": true, + "evaluatorOptions": { + "outputOnly": true, + "plugin": "plugin-client-common" + }, + "execOptions": { + "echo": true, + "type": 1, + "execUUID": "55e8c1ca-b9c8-4fda-960b-eeb6ee8b290e", + "history": 76, + "env": {} + }, + "response": { + "apiVersion": "kui-shell/v1", + "kind": "CommentaryResponse", + "props": { + "children": "#### Clicking cells in the table views above will show details below:" + } + }, + "responseType": "ScalarResponse", + "historyIdx": 76 + }, + "isExperimental": false, + "isReplay": true, + "execUUID": "55e8c1ca-b9c8-4fda-960b-eeb6ee8b290e", + "startTime": 1612386630740, + "outputOnly": true, + "state": "valid-response" + } + ] + } + ] + } +} diff --git a/plugins/plugin-kubectl/src/non-headless-preload.ts b/plugins/plugin-kubectl/src/non-headless-preload.ts index 47ba07ad68e..7efa54a2e12 100644 --- a/plugins/plugin-kubectl/src/non-headless-preload.ts +++ b/plugins/plugin-kubectl/src/non-headless-preload.ts @@ -70,7 +70,8 @@ export default async (registrar: PreloadRegistrar) => { 'plugin://plugin-kubectl/notebooks/create-jobs.json', 'plugin://plugin-kubectl/notebooks/crud-operations.json', 'plugin://plugin-kubectl/notebooks/deploy-applications.json', - 'plugin://plugin-kubectl/notebooks/dashboard.json' + 'plugin://plugin-kubectl/notebooks/dashboard.json', + 'plugin://plugin-kubectl/notebooks/popeye.json' ], '/kui/kubernetes/' )