Skip to content

Commit

Permalink
Add documentation about delete options
Browse files Browse the repository at this point in the history
  • Loading branch information
glennschmidt authored Jul 8, 2017
1 parent e580f30 commit 6d4f08b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,16 @@ $replicationController = $client->replicationControllers()->setLabelSelector([
])->first();
$client->replicationControllers()->delete($replicationController);
```

You can also specify options when performing a deletion, eg. to perform [cascading delete]( https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#setting-the-cascading-deletion-policy)

```php
use Maclof\Kubernetes\Models\DeleteOptions;

$client->replicationControllers()->delete($replicationController,
new DeleteOptions(['propagationPolicy' => 'Background']));
```

See the API documentation for an explanation of the options:

https://kubernetes.io/docs/api-reference/v1.6/#deleteoptions-v1-meta

0 comments on commit 6d4f08b

Please sign in to comment.