Skip to content

Commit 403dd41

Browse files
author
Davis
authored
Add exec request option
1 parent 7be10ea commit 403dd41

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Repositories/PodRepository.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@ public function logs(Pod $pod, array $options = [])
2525

2626
return $response;
2727
}
28+
29+
/**
30+
* Execute a command on a pod.
31+
*
32+
* @param \Maclof\Kubernetes\Models\Pod $pod
33+
* @param array $options
34+
* @return string
35+
*/
36+
public function exec(Pod $pod, array $options = [])
37+
{
38+
$response = $this->client->sendRequest('GET', '/' . $this->uri . '/' . $pod->getMetadata('name') . '/exec', $options);
39+
40+
return $response;
41+
}
2842
}

0 commit comments

Comments
 (0)