Skip to content

Commit

Permalink
Add exec request option
Browse files Browse the repository at this point in the history
  • Loading branch information
Davis authored May 17, 2017
1 parent 7be10ea commit 403dd41
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Repositories/PodRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,18 @@ public function logs(Pod $pod, array $options = [])

return $response;
}

/**
* Execute a command on a pod.
*
* @param \Maclof\Kubernetes\Models\Pod $pod
* @param array $options
* @return string
*/
public function exec(Pod $pod, array $options = [])
{
$response = $this->client->sendRequest('GET', '/' . $this->uri . '/' . $pod->getMetadata('name') . '/exec', $options);

return $response;
}
}

0 comments on commit 403dd41

Please sign in to comment.