Skip to content

Commit

Permalink
Merge pull request #8 from dav-is/patch-1
Browse files Browse the repository at this point in the history
Add 'exec' Request Option for Pods
  • Loading branch information
maclof authored May 17, 2017
2 parents 7be10ea + 436df71 commit 8bc49dd
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('POST', '/' . $this->uri . '/' . $pod->getMetadata('name') . '/exec', $options);

return $response;
}
}

0 comments on commit 8bc49dd

Please sign in to comment.