Blame SOURCES/0075-kubernetes-new-plugin.patch

0cd6dc
From 5cee9ce0170ce3d039a17dac935583b9ad3e42ef Mon Sep 17 00:00:00 2001
0cd6dc
From: Neependra Khare <nkhare@redhat.com>
0cd6dc
Date: Mon, 26 Jan 2015 15:04:07 +0000
0cd6dc
Subject: [PATCH 75/93] [kubernetes] new plugin
0cd6dc
0cd6dc
Add a plugin for Kubernetes support.
0cd6dc
0cd6dc
Signed-off-by: Neependra Khare <nkhare@redhat.com>
0cd6dc
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
0cd6dc
---
0cd6dc
 sos/plugins/kubernetes.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++
0cd6dc
 1 file changed, 46 insertions(+)
0cd6dc
 create mode 100644 sos/plugins/kubernetes.py
0cd6dc
0cd6dc
diff --git a/sos/plugins/kubernetes.py b/sos/plugins/kubernetes.py
0cd6dc
new file mode 100644
0cd6dc
index 0000000..af3f3a6
0cd6dc
--- /dev/null
0cd6dc
+++ b/sos/plugins/kubernetes.py
0cd6dc
@@ -0,0 +1,46 @@
0cd6dc
+# Copyright (C) 2014 Red Hat, Inc. Neependra Khare <nkhare@redhat.com>
0cd6dc
+# Copyright (C) 2014 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com>
0cd6dc
+# This program is free software; you can redistribute it and/or modify
0cd6dc
+# it under the terms of the GNU General Public License as published by
0cd6dc
+# the Free Software Foundation; either version 2 of the License, or
0cd6dc
+# (at your option) any later version.
0cd6dc
+
0cd6dc
+# This program is distributed in the hope that it will be useful,
0cd6dc
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
0cd6dc
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0cd6dc
+# GNU General Public License for more details.
0cd6dc
+
0cd6dc
+# You should have received a copy of the GNU General Public License
0cd6dc
+# along with this program; if not, write to the Free Software
0cd6dc
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0cd6dc
+
0cd6dc
+from sos.plugins import Plugin, RedHatPlugin
0cd6dc
+
0cd6dc
+
0cd6dc
+class kubernetes(Plugin, RedHatPlugin):
0cd6dc
+
0cd6dc
+    """Kubernetes plugin
0cd6dc
+    """
0cd6dc
+
0cd6dc
+    def setup(self):
0cd6dc
+        self.add_copy_spec("/etc/kubernetes")
0cd6dc
+        self.add_copy_spec("/etc/etcd")
0cd6dc
+        self.add_copy_spec("/var/run/flannel")
0cd6dc
+
0cd6dc
+        # Kubernetes master info
0cd6dc
+        self.add_cmd_output("kubectl version")
0cd6dc
+        self.add_cmd_output("kubectl get -o json pods")
0cd6dc
+        self.add_cmd_output("kubectl get -o json minions")
0cd6dc
+        self.add_cmd_output("kubectl get -o json replicationController")
0cd6dc
+        self.add_cmd_output("kubectl get -o json events")
0cd6dc
+        self.add_cmd_output("journalctl -r -u kubelet")
0cd6dc
+
0cd6dc
+        # etcd
0cd6dc
+        self.add_cmd_output("curl http://127.0.0.1:4001/version")
0cd6dc
+        self.add_cmd_output("curl http://127.0.0.1:4001/v2/members")
0cd6dc
+        self.add_cmd_output("curl http://127.0.0.1:4001/v2/stats/leader")
0cd6dc
+        self.add_cmd_output("curl http://127.0.0.1:4001/v2/stats/self")
0cd6dc
+        self.add_cmd_output("curl http://127.0.0.1:4001/v2/stats/store")
0cd6dc
+
0cd6dc
+
0cd6dc
+# vim: et ts=5 sw=4
0cd6dc
-- 
0cd6dc
1.9.3
0cd6dc