diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a67a171..c77c1ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: strategy: matrix: php: - - '7.3' - '7.4' + - '8.0' laravel: - 7.* - 8.* @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@v1 - + - name: Setup PHP uses: shivammathur/setup-php@v2 with: diff --git a/composer.json b/composer.json index 6a5b065..676b564 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "renoki-co/php-k8s": "^1.12" + "renoki-co/php-k8s": "^2.0" }, "autoload": { "psr-4": { diff --git a/config/k8s.php b/config/k8s.php index 356406a..28d5bae 100644 --- a/config/k8s.php +++ b/config/k8s.php @@ -45,8 +45,7 @@ 'http' => [ 'driver' => 'http', - 'host' => env('KUBE_HOST', '127.0.0.1'), - 'port' => env('KUBE_PORT', 8080), + 'host' => env('KUBE_HOST', 'http://127.0.0.1:8080'), 'ssl' => [ 'certificate' => env('KUBE_CERTIFICATE_PATH', null), 'key' => env('KUBE_KEY_PATH', null), @@ -71,8 +70,7 @@ 'token' => [ 'driver' => 'token', - 'host' => env('KUBE_HOST', '127.0.0.1'), - 'port' => env('KUBE_PORT', 8080), + 'host' => env('KUBE_HOST', 'http://127.0.0.1:8080'), 'ssl' => [ 'certificate' => env('KUBE_CERTIFICATE_PATH', null), 'key' => env('KUBE_KEY_PATH', null), diff --git a/src/KubernetesCluster.php b/src/KubernetesCluster.php index ec095e4..169e2a2 100644 --- a/src/KubernetesCluster.php +++ b/src/KubernetesCluster.php @@ -47,7 +47,7 @@ public function connection(string $connection) */ protected function loadFromConfig(array $config) { - $this->cluster = new PhpK8sCluster('http://127.0.0.1', 8080); + $this->cluster = new PhpK8sCluster('http://127.0.0.1:8080'); switch ($config['driver'] ?? null) { case 'kubeconfig': $this->configureWithKubeConfigFile($config); break; @@ -78,9 +78,7 @@ protected function configureWithKubeConfigFile(array $config) */ protected function configureWithHttpAuth(array $config) { - $this->cluster = new PhpK8sCluster( - $config['host'], $config['port'] - ); + $this->cluster = new PhpK8sCluster($config['host']); if ($config['ssl']['verify'] ?? true) { $this->cluster->withCertificate( @@ -112,9 +110,7 @@ protected function configureWithHttpAuth(array $config) */ protected function configureWithToken(array $config) { - $this->cluster = new PhpK8sCluster( - $config['host'], $config['port'] - ); + $this->cluster = new PhpK8sCluster($config['host']); if ($config['ssl']['verify'] ?? true) { $this->cluster->withCertificate(