You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(Kubernetes Client): add version / namespace calls.
This adds the possibility to fetch the version
of the actual kubernetes cluster via the client.
This adds the possiblity to fetch the used namespace
via downwardAPI, file, or default from kubernetes.
Copy file name to clipboardExpand all lines: src/KubeOps/Operator/Client/IKubernetesClient.cs
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,36 @@ public interface IKubernetesClient
12
12
{
13
13
IKubernetesApiClient{get;}
14
14
15
+
/// <summary>
16
+
/// Returns the name of the current namespace.
17
+
/// To determine the current namespace the following places (in the given order) are checked:
18
+
/// <list type="number">
19
+
/// <item>
20
+
/// <description>The created kubernetes configuration (from file / incluster)</description>
21
+
/// </item>
22
+
/// <item>
23
+
/// <description>
24
+
/// The env variable given as the param to the function (default "POD_NAMESPACE")
25
+
/// which can be provided by the <a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#capabilities-of-the-downward-api">kubernetes downward API</a>
26
+
/// </description>
27
+
/// </item>
28
+
/// <item>
29
+
/// <description>
30
+
/// The fallback secret file if running on the cluster
0 commit comments