diff --git a/src/Client.php b/src/Client.php index c91c4f0..11ea2ab 100644 --- a/src/Client.php +++ b/src/Client.php @@ -116,6 +116,7 @@ class Client 'events' => 'Repositories\EventRepository', 'configMaps' => 'Repositories\ConfigMapRepository', 'endpoints' => 'Repositories\EndpointRepository', + 'persistentVolumeClaims' => 'Repositories\PersistentVolumeClaimRepository', // extensions/v1beta1 'deployments' => 'Repositories\DeploymentRepository', diff --git a/src/Collections/PersistentVolumeClaimCollection.php b/src/Collections/PersistentVolumeClaimCollection.php new file mode 100644 index 0000000..fede1cd --- /dev/null +++ b/src/Collections/PersistentVolumeClaimCollection.php @@ -0,0 +1,31 @@ +getPersistentVolumeClaims(isset($data['items']) ? $data['items'] : [])); + } + + /** + * Get an array of persistent volume claims. + * + * @param array $items + * @return array + */ + protected function getPersistentVolumeClaims(array $items) + { + foreach ($items as &$item) { + $item = new PersistentVolumeClaim($item); + } + + return $items; + } +} diff --git a/src/Models/PersistentVolumeClaim.php b/src/Models/PersistentVolumeClaim.php new file mode 100644 index 0000000..ef390df --- /dev/null +++ b/src/Models/PersistentVolumeClaim.php @@ -0,0 +1,6 @@ +