Skip to content

Commit

Permalink
Update the Kubernetes Client to 10.x (#2338)
Browse files Browse the repository at this point in the history
* Update the Kubernetes Client to 10.x

* Bump KubernetesClient version to 10.1.19

---------

Co-authored-by: Karl Martin-Chambers <karl.martin-chambers@aveva.com>
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
  • Loading branch information
3 people committed Dec 12, 2023
1 parent 3f9e3a0 commit 8de4032
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Expand Up @@ -37,7 +37,13 @@ public async Task UpdateStatusAsync(CancellationToken cancellationToken)
var service = await _client.CoreV1.ReadNamespacedServiceStatusAsync(_options.ControllerServiceName, _options.ControllerServiceNamespace, cancellationToken: cancellationToken);
if (service.Status?.LoadBalancer?.Ingress is { } loadBalancerIngresses)
{
var status = new V1IngressStatus(new V1LoadBalancerStatus(loadBalancerIngresses));
var status = new V1IngressStatus(new V1IngressLoadBalancerStatus(loadBalancerIngresses?.Select(ingress => new V1IngressLoadBalancerIngress
{
Hostname = ingress.Hostname,
Ip = ingress.Ip,
Ports = ingress.Ports?.Select(port => new V1IngressPortStatus(port.Port, port.Protocol, port.Error)).ToArray()
}).ToArray()));

var ingresses = _cache.GetIngresses().ToArray();
foreach (var ingress in ingresses)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Kubernetes.Controller/Yarp.Kubernetes.Controller.csproj
Expand Up @@ -14,8 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="KubernetesClient" Version="9.0.28" />
<PackageReference Include="YamlDotNet" Version="12.0.1" />
<PackageReference Include="KubernetesClient" Version="10.1.19" />
<PackageReference Include="YamlDotNet" Version="13.7.1" />
</ItemGroup>

</Project>

0 comments on commit 8de4032

Please sign in to comment.