Skip to content

Commit

Permalink
Merge pull request #1 from renoki-co/update/2.x
Browse files Browse the repository at this point in the history
[update] 2.x upgrade
  • Loading branch information
rennokki committed Feb 4, 2021
2 parents 9cc4d8f + 889ddaf commit 101db88
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
strategy:
matrix:
php:
- '7.3'
- '7.4'
- '8.0'
laravel:
- 7.*
- 8.*
Expand All @@ -37,7 +37,7 @@ jobs:

steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"renoki-co/php-k8s": "^1.12"
"renoki-co/php-k8s": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 2 additions & 4 deletions config/k8s.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
10 changes: 3 additions & 7 deletions src/KubernetesCluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 101db88

Please sign in to comment.