From b1d5c31aee2fb97380bf75ccb52bbf6516def95a Mon Sep 17 00:00:00 2001 From: Alex Renoki Date: Tue, 16 Nov 2021 16:53:34 +0200 Subject: [PATCH] Added host in inClusterConfiguration --- composer.json | 2 +- src/KubernetesCluster.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 8551f1b..c32c517 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "renoki-co/php-k8s": "^3.1" + "renoki-co/php-k8s": "^3.1.8" }, "autoload": { "psr-4": { diff --git a/src/KubernetesCluster.php b/src/KubernetesCluster.php index 1a8c5b8..60df8dd 100644 --- a/src/KubernetesCluster.php +++ b/src/KubernetesCluster.php @@ -142,7 +142,9 @@ protected function configureWithToken(array $config) */ protected function configureInCluster(array $config) { - $this->cluster = PhpK8sCluster::inClusterConfiguration(); + $this->cluster = PhpK8sCluster::inClusterConfiguration( + $config['host'] ?? 'https://kubernetes.default.svc' + ); } /**