Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Dec 17, 2024
1 parent d818dbe commit 80b09b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demo/deployment-slimfaas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ spec:
serviceAccountName: slimfaas
containers:
- name: slimfaas
image: axaguildev/slimfaas:pr-77-820
image: axaguildev/slimfaas:pr-77-821
livenessProbe:
httpGet:
path: /health
Expand Down
11 changes: 9 additions & 2 deletions src/SlimFaas/Kubernetes/KubernetesService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,15 @@ private static async Task AddDeployments(string kubeNamespace, V1DeploymentList
{

var endpoints = await client.CoreV1.ReadNamespacedEndpointsAsync(name, kubeNamespace);
var readyAddresses = endpoints.Subsets.SelectMany(s => s.Addresses).ToList();
Console.WriteLine("ReadyAdresses: " + name + " - " +readyAddresses.Count);
if(endpoints != null && endpoints.Subsets != null)
{
var readyAddresses = endpoints.Subsets
.Where(s => s.Addresses != null)
.SelectMany(s => s.Addresses)
.ToList();
Console.WriteLine("ReadyAdresses: " + name + " - " +readyAddresses.Count);
}


}
catch (Exception e)
Expand Down

0 comments on commit 80b09b3

Please sign in to comment.