Change necessary due to switch over to bitnami versions of etcd and kafka
Change-Id: I67d549b607958416737c10790747bd5d89e706d0
diff --git a/libraries/k8s.robot b/libraries/k8s.robot
old mode 100755
new mode 100644
index 09db866..59e6544
--- a/libraries/k8s.robot
+++ b/libraries/k8s.robot
@@ -63,6 +63,19 @@
Log ${output}
[return] ${output}
+Exec Pod In Kube
+ [Arguments] ${namespace} ${name} ${command}
+ [Documentation] Uses kubectl to execute a command in the pod and return the output
+ ${rc} ${exec_pod_name}= Run and Return Rc and Output
+ ... kubectl -n ${namespace} get pods -l app.kubernetes.io/name=${name} -o name
+ Log ${exec_pod_name}
+ Should Not Be Empty ${exec_pod_name} Unable to parse pod name
+ ${rc} ${output}= Run and Return Rc and Output
+ ... kubectl exec -i ${exec_pod_name} -n ${namespace} -- ${command}
+ Log ${output}
+ [return] ${output}
+
+
Exec Pod Separate Stderr
[Arguments] ${namespace} ${name} ${command}
[Documentation] Uses kubectl to execute a command in the pod and return the stderr and stdout