Skip to content

Commit 963510e

Browse files
authored
Merge pull request #22 from renoki-co/feature/host-in-cluster
[3.x] Added host in `inClusterConfiguration`
2 parents 373320b + b1d5c31 commit 963510e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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": "^3.1"
15+
"renoki-co/php-k8s": "^3.1.8"
1616
},
1717
"autoload": {
1818
"psr-4": {

src/KubernetesCluster.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ protected function configureWithToken(array $config)
142142
*/
143143
protected function configureInCluster(array $config)
144144
{
145-
$this->cluster = PhpK8sCluster::inClusterConfiguration();
145+
$this->cluster = PhpK8sCluster::inClusterConfiguration(
146+
$config['host'] ?? 'https://kubernetes.default.svc'
147+
);
146148
}
147149

148150
/**

0 commit comments

Comments
 (0)