From 19eeb21959bdf5b3534ab41ebf9cd08445473f04 Mon Sep 17 00:00:00 2001 From: Floris van Maldegem Date: Tue, 23 May 2023 10:35:24 +0200 Subject: [PATCH] Added k8s cluster reset --- CHANGELOG.md | 5 +++++ src/Repository/Kubernetes/ClusterRepository.php | 13 +++++++++++++ src/TransipAPI.php | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b763e30..96effa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ CHANGELOG ========= + +6.41.0 +---- +* Added Kubernetes cluster reset (experimental) + 6.40.0 ---- * Added Kubernetes events (experimental) diff --git a/src/Repository/Kubernetes/ClusterRepository.php b/src/Repository/Kubernetes/ClusterRepository.php index 1f87984..aa78492 100644 --- a/src/Repository/Kubernetes/ClusterRepository.php +++ b/src/Repository/Kubernetes/ClusterRepository.php @@ -106,6 +106,19 @@ public function handover(string $clusterName, string $targetCustomerName): void ); } + public function reset(string $clusterName, string $confirmation): void + { + $parameters = [ + 'action' => 'reset', + 'confirmation' => $confirmation + ]; + + $this->httpClient->patch( + $this->getResourceUrl($clusterName), + $parameters + ); + } + public function remove(string $clusterName): void { $this->httpClient->delete( diff --git a/src/TransipAPI.php b/src/TransipAPI.php index 801b0b3..2e613aa 100644 --- a/src/TransipAPI.php +++ b/src/TransipAPI.php @@ -94,7 +94,7 @@ class TransipAPI { public const TRANSIP_API_ENDPOINT = "https://api.transip.nl/v6"; - public const TRANSIP_API_LIBRARY_VERSION = "6.40.0"; + public const TRANSIP_API_LIBRARY_VERSION = "6.41.0"; public const TRANSIP_API_DEMO_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImN3MiFSbDU2eDNoUnkjelM4YmdOIn0.eyJpc3MiOiJhcGkudHJhbnNpcC5ubCIsImF1ZCI6ImFwaS50cmFuc2lwLm5sIiwianRpIjoiY3cyIVJsNTZ4M2hSeSN6UzhiZ04iLCJpYXQiOjE1ODIyMDE1NTAsIm5iZiI6MTU4MjIwMTU1MCwiZXhwIjoyMTE4NzQ1NTUwLCJjaWQiOiI2MDQ0OSIsInJvIjpmYWxzZSwiZ2siOmZhbHNlLCJrdiI6dHJ1ZX0.fYBWV4O5WPXxGuWG-vcrFWqmRHBm9yp0PHiYh_oAWxWxCaZX2Rf6WJfc13AxEeZ67-lY0TA2kSaOCp0PggBb_MGj73t4cH8gdwDJzANVxkiPL1Saqiw2NgZ3IHASJnisUWNnZp8HnrhLLe5ficvb1D9WOUOItmFC2ZgfGObNhlL2y-AMNLT4X7oNgrNTGm-mespo0jD_qH9dK5_evSzS3K8o03gu6p19jxfsnIh8TIVRvNdluYC2wo4qDl5EW5BEZ8OSuJ121ncOT1oRpzXB0cVZ9e5_UVAEr9X3f26_Eomg52-PjrgcRJ_jPIUYbrlo06KjjX2h0fzMr21ZE023Gw"; /**