Skip to content

Commit 101db88

Browse files
authored
Merge pull request #1 from renoki-co/update/2.x
[update] 2.x upgrade
2 parents 9cc4d8f + 889ddaf commit 101db88

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
strategy:
2020
matrix:
2121
php:
22-
- '7.3'
2322
- '7.4'
23+
- '8.0'
2424
laravel:
2525
- 7.*
2626
- 8.*
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- uses: actions/checkout@v1
40-
40+
4141
- name: Setup PHP
4242
uses: shivammathur/setup-php@v2
4343
with:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"renoki-co/php-k8s": "^1.12"
15+
"renoki-co/php-k8s": "^2.0"
1616
},
1717
"autoload": {
1818
"psr-4": {

config/k8s.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545

4646
'http' => [
4747
'driver' => 'http',
48-
'host' => env('KUBE_HOST', '127.0.0.1'),
49-
'port' => env('KUBE_PORT', 8080),
48+
'host' => env('KUBE_HOST', 'http://127.0.0.1:8080'),
5049
'ssl' => [
5150
'certificate' => env('KUBE_CERTIFICATE_PATH', null),
5251
'key' => env('KUBE_KEY_PATH', null),
@@ -71,8 +70,7 @@
7170

7271
'token' => [
7372
'driver' => 'token',
74-
'host' => env('KUBE_HOST', '127.0.0.1'),
75-
'port' => env('KUBE_PORT', 8080),
73+
'host' => env('KUBE_HOST', 'http://127.0.0.1:8080'),
7674
'ssl' => [
7775
'certificate' => env('KUBE_CERTIFICATE_PATH', null),
7876
'key' => env('KUBE_KEY_PATH', null),

src/KubernetesCluster.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function connection(string $connection)
4747
*/
4848
protected function loadFromConfig(array $config)
4949
{
50-
$this->cluster = new PhpK8sCluster('http://127.0.0.1', 8080);
50+
$this->cluster = new PhpK8sCluster('http://127.0.0.1:8080');
5151

5252
switch ($config['driver'] ?? null) {
5353
case 'kubeconfig': $this->configureWithKubeConfigFile($config); break;
@@ -78,9 +78,7 @@ protected function configureWithKubeConfigFile(array $config)
7878
*/
7979
protected function configureWithHttpAuth(array $config)
8080
{
81-
$this->cluster = new PhpK8sCluster(
82-
$config['host'], $config['port']
83-
);
81+
$this->cluster = new PhpK8sCluster($config['host']);
8482

8583
if ($config['ssl']['verify'] ?? true) {
8684
$this->cluster->withCertificate(
@@ -112,9 +110,7 @@ protected function configureWithHttpAuth(array $config)
112110
*/
113111
protected function configureWithToken(array $config)
114112
{
115-
$this->cluster = new PhpK8sCluster(
116-
$config['host'], $config['port']
117-
);
113+
$this->cluster = new PhpK8sCluster($config['host']);
118114

119115
if ($config['ssl']['verify'] ?? true) {
120116
$this->cluster->withCertificate(

0 commit comments

Comments
 (0)