Skip to content

Commit

Permalink
fix: use System.Uri to parse host from k8s config (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdxcxs authored Jan 29, 2024
1 parent 4317794 commit 69e4745
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public KubernetesProvider(IOptions<RegistryConfig> registry, IOptions<ContainerP

var config = KubernetesClientConfiguration.BuildConfigFromConfigFile(_kubernetesMetadata.Config.KubeConfig);

_kubernetesMetadata.HostIp = config.Host[(config.Host.LastIndexOf('/') + 1)..config.Host.LastIndexOf(':')];
_kubernetesMetadata.HostIp = new System.Uri(config.Host).Host;

_kubernetesClient = new Kubernetes(config);

Expand Down

0 comments on commit 69e4745

Please sign in to comment.