return error is client not set

Signed-off-by: Jeff Knurek <j.knurek@travelaudience.com>
pull/6167/head
Jeff Knurek 6 years ago
parent c21ae5faa1
commit 0394853d6d

@ -931,7 +931,10 @@ func (c *Client) watchPodUntilComplete(timeout time.Duration, info *resource.Inf
// GetPodLogs takes pod name and namespace and returns the current logs (streaming is NOT enabled). // GetPodLogs takes pod name and namespace and returns the current logs (streaming is NOT enabled).
func (c *Client) GetPodLogs(name, ns string) (string, error) { func (c *Client) GetPodLogs(name, ns string) (string, error) {
client, _ := c.KubernetesClientSet() client, err := c.KubernetesClientSet()
if err != nil {
return "", err
}
req := client.CoreV1().Pods(ns).GetLogs(name, &v1.PodLogOptions{}) req := client.CoreV1().Pods(ns).GetLogs(name, &v1.PodLogOptions{})
podLogs, err := req.Stream() podLogs, err := req.Stream()
if err != nil { if err != nil {

Loading…
Cancel
Save