aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2019-03-20 11:22:31 -0400
committerBryn M. Reeves <bmr@redhat.com>2019-03-21 12:44:45 +0000
commit870e1f82f65f4917baeb9e5c3e32aadc8773c8e7 (patch)
treeea50d409b4a9fdf09e95b4be9c4872595900ef67
parent4f0b4ae64e8561b2e73a4a4294982ec2ced2c74b (diff)
downloadsos-870e1f82f65f4917baeb9e5c3e32aadc8773c8e7.tar.gz
[kubernetes] Collect vm/vmi information if CNV is in use
If CNV is installed ontop of the base kubernetes installation, collect output for the 'vms' and 'vmis' resources as well as virtctl. Resolves: #1599 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/kubernetes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py
index 74f56ccb..8045fe81 100644
--- a/sos/plugins/kubernetes.py
+++ b/sos/plugins/kubernetes.py
@@ -97,6 +97,11 @@ class kubernetes(Plugin, RedHatPlugin):
"{} get --raw /metrics".format(kube_cmd)
])
+ # CNV is not part of the base installation, but can be added
+ if self.is_installed('kubevirt-virtctl'):
+ resources.extend(['vms', 'vmis'])
+ self.add_cmd_output('virtctl version')
+
for n in knsps:
knsp = '--namespace=%s' % n
if self.get_option('all'):