tintoy / dotnet-kube-client

A Kubernetes API client for .NET Standard / .NET Core
MIT License
192 stars 32 forks source link

Detect current Pod namespace #137

Closed wasabii closed 3 years ago

wasabii commented 3 years ago

It looks like using KubeClient.Extensions.Configuration requires the kubeNamespace to be passed, or it defaults down to "default". Instead, it should attempt to read the namespace from /var/run/secrets/kubernetes.io/serviceaccount/namespace. Looks like this should go into CreateFromPodServiceAccount.

tintoy commented 3 years ago

Good idea!

I’ll add that in sometime this weekend 🙂

tintoy commented 3 years ago

Hi - I haven’t forgot about this, work’s just a little busy at the moment. I hope to have time to add this in tonight 🙂

tintoy commented 3 years ago

Published v2.4.6 🙂

(may take a while to become visible on NuGet; I think their indexing process is asynchronous)

tintoy commented 3 years ago

(sorry for the long delay, I thought this had already been published in the previous release!)